linux-imx/drivers/scsi
Martin K. Petersen f1fe73d248 scsi: sd: Fix capacity calculation with 32-bit sector_t
commit 7c856152cb upstream.

We previously made sure that the reported disk capacity was less than
0xffffffff blocks when the kernel was not compiled with large sector_t
support (CONFIG_LBDAF). However, this check assumed that the capacity
was reported in units of 512 bytes.

Add a sanity check function to ensure that we only enable disks if the
entire reported capacity can be expressed in terms of sector_t.

Reported-by: Steve Magnani <steve.magnani@digidescorp.com>
Cc: Bart Van Assche <Bart.VanAssche@sandisk.com>
Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
2017-04-28 19:30:45 +02:00
..
aacraid scsi: aacraid: Reorder Adapter status check 2017-03-13 21:40:27 +01:00
aic7xxx [SCSI] aic7xxx: fix swapped arguments in ahc_find_pci_device 2013-09-10 14:48:16 -07:00
aic7xxx_old scsi: Spelling hsot -> host 2013-05-28 12:02:12 +02:00
aic94xx [SCSI] libsas: implement > 16 byte CDB support 2013-06-04 11:15:59 -07:00
arcmsr scsi: arcmsr: Send SYNCHRONIZE_CACHE command to firmware 2016-11-24 16:23:31 +01:00
arm acornscsi: switch to ->show_info() 2013-04-09 14:13:27 -04:00
be2iscsi be2iscsi: Fix bogus WARN_ON length check 2016-09-29 11:14:03 +02:00
bfa bfa: Fix undefined bit shift on big-endian architectures with 32-bit DMA address 2014-09-17 16:55:09 +02:00
bnx2fc bnx2fc: do not add shared skbs to the fcoe_rx_list 2014-12-06 15:18:26 +01:00
bnx2i bnx2x, cnic, bnx2i, bnx2fc: Fix bnx2i and bnx2fc regressions. 2013-09-18 12:24:32 -04:00
csiostor [SCSI] csiostor: Retain default adapter configuration in absence of config file. 2013-06-04 11:16:28 -07:00
cxgbi treewide: Add __GFP_NOWARN to k.alloc calls with v.alloc fallbacks 2013-08-20 13:06:40 +02:00
device_handler scsi_dh_rdac: always retry MODE SELECT on command lock violation 2016-02-24 10:23:28 +01:00
dpt atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
esas2r scsi: correct return values for .eh_abort_handler implementations 2015-01-07 16:24:09 +01:00
fcoe SCSI for-linus on 20130713 2013-07-13 17:41:21 -07:00
fnic [SCSI] fnic: fnic Driver Tuneables Exposed through CLI 2013-09-11 15:59:25 -07:00
ibmvscsi scsi: ibmvfc: Fix I/O hang when port is not mapped 2016-10-25 18:11:18 +02:00
isci SCSI: isci: correct erroneous for_each_isci_host macro 2014-03-24 09:45:03 +01:00
libfc libfc: Fix fc_fcp_cleanup_each_cmd() 2015-09-18 09:26:32 +02:00
libsas scsi: libsas: fix ata xfer length 2017-04-07 14:59:29 +02:00
lpfc scsi: lpfc: Add shutdown method for kexec 2017-04-07 09:17:51 +02:00
megaraid scsi: megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression 2016-11-24 16:23:40 +01:00
mpt2sas Revert "[SCSI] mpt2sas: Remove phys on topology change." 2015-01-26 14:39:31 +01:00
mpt3sas scsi: mpt3sas: fix hang on ata passthrough commands 2017-04-07 14:33:55 +02:00
mvsas mvsas: fix misleading indentation 2017-03-28 15:49:18 +02:00
osd SCSI: OSD: convert class code to use dev_groups 2013-07-25 16:34:39 -07:00
pcmcia nsp_cs: switch to ->show_info() 2013-04-09 14:13:21 -04:00
pm8001 SCSI misc on 20130903 2013-09-03 15:48:06 -07:00
qla2xxx qla2xxx: Fix crash due to null pointer access 2017-01-26 17:41:04 +01:00
qla4xxx [SCSI] qla4xxx: Update driver version to 5.04.00-k1 2013-09-03 07:27:57 -07:00
sym53c8xx_2 sym53c8xx_2: Set DID_REQUEUE return code when aborting squeue 2014-07-18 15:51:11 +02:00
ufs [SCSI] ufs: configure the attribute for power mode 2013-09-06 16:08:37 -07:00
.gitignore
3w-9xxx.c 3w-9xxx: don't unmap bounce buffered commands 2015-10-28 16:38:10 +01:00
3w-9xxx.h 3w-9xxx: fix command completion race 2015-05-15 09:10:51 +02:00
3w-sas.c 3w-sas: fix command completion race 2015-05-15 09:10:51 +02:00
3w-sas.h 3w-sas: fix command completion race 2015-05-15 09:10:51 +02:00
3w-xxxx.c 3w-xxxx: fix command completion race 2015-05-15 09:10:50 +02:00
3w-xxxx.h 3w-xxxx: fix mis-aligned struct accesses 2015-08-19 08:36:44 +02:00
53c700_d.h_shipped Fix common misspellings 2011-03-31 11:26:23 -03:00
53c700.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
53c700.h
53c700.scr Fix common misspellings 2011-03-31 11:26:23 -03:00
a100u2w.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
a100u2w.h
a2091.c switch wd33c93 to ->show_info() 2013-04-09 14:13:15 -04:00
a2091.h
a3000.c [SCSI] a3000: use module_platform_driver_probe() 2013-06-24 19:44:18 +02:00
a3000.h
a4000t.c [SCSI] a4000t: use module_platform_driver_probe() 2013-06-24 19:44:18 +02:00
advansys.c advansys: fix buggered formats - unsigned long != u32 on 64bit 2013-04-09 14:13:22 -04:00
aha152x.c aha152x: switch to ->show_info() 2013-04-09 14:13:22 -04:00
aha152x.h
aha1542.c treewide: Put a space between #include and FILE 2012-06-28 11:44:36 +02:00
aha1542.h
aha1740.c scsi: correct return values for .eh_abort_handler implementations 2015-01-07 16:24:09 +01:00
aha1740.h
aic7xxx_old.c aix7xxx_old: switch to ->show_info() 2013-04-09 14:13:28 -04:00
atari_NCR5380.c scsi: correct return values for .eh_abort_handler implementations 2015-01-07 16:24:09 +01:00
atari_scsi.c atari_scsi: switch to ->show_info() 2013-04-09 14:13:29 -04:00
atari_scsi.h atari_scsi: switch to ->show_info() 2013-04-09 14:13:29 -04:00
atp870u.c atp870u: switch to ->show_info() 2013-04-09 14:13:24 -04:00
atp870u.h
BusLogic.c [SCSI] BusLogic: Fix an oops when intializing multimaster adapter 2013-10-16 13:57:14 +01:00
BusLogic.h [SCSI] BusLogic: Port driver to 64-bit. 2013-06-26 18:32:47 -07:00
bvme6000_scsi.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
ch.c scsi: convert to idr_alloc() 2013-02-27 19:10:18 -08:00
constants.c scsi: fix upper bounds check of sense key in scsi_sense_key_string() 2016-09-29 11:14:16 +02:00
dc395x.c dc395x: switch to ->show_info() 2013-04-09 14:13:24 -04:00
dc395x.h Fix common misspellings 2011-03-31 11:26:23 -03:00
dmx3191d.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
dpt_i2o.c dpt_i2o: switch to ->show_info() 2013-04-09 14:13:24 -04:00
dpti.h
dtc.c NCR5830: switch to ->show_info() 2013-04-09 14:13:17 -04:00
dtc.h NCR5830: switch to ->show_info() 2013-04-09 14:13:17 -04:00
eata_generic.h
eata_pio.c [SCSI] eata_pio: off by one in eata_pio_detect() 2013-09-03 07:27:58 -07:00
eata_pio.h
eata.c [SCSI] remove cmd->serial_number litter 2011-05-01 10:22:40 -05:00
esp_scsi.c esp_scsi: Fix tag state corruption when autosensing. 2013-08-01 18:08:34 -07:00
esp_scsi.h esp_scsi: Fix tag state corruption when autosensing. 2013-08-01 18:08:34 -07:00
fdomain.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
fdomain.h
FlashPoint.c [SCSI] BusLogic: Port driver to 64-bit. 2013-06-26 18:32:47 -07:00
g_NCR5380_mmio.c
g_NCR5380.c NCR5830: switch to ->show_info() 2013-04-09 14:13:17 -04:00
g_NCR5380.h
gdth_ioctl.h
gdth_proc.c gdth: switch to ->show_info() 2013-04-09 14:13:16 -04:00
gdth_proc.h gdth: switch to ->show_info() 2013-04-09 14:13:16 -04:00
gdth.c SCSI: Disable WRITE SAME for RAID and virtual host adapter drivers 2013-12-11 22:37:55 -08:00
gdth.h gdth: switch to ->show_info() 2013-04-09 14:13:16 -04:00
gvp11.c switch wd33c93 to ->show_info() 2013-04-09 14:13:15 -04:00
gvp11.h
hosts.c Fix a memory leak in scsi_host_dev_release() 2016-02-24 10:23:25 +01:00
hpsa_cmd.h [SCSI] hpsa: dial down lockup detection during firmware flash 2012-05-10 09:19:39 +01:00
hpsa.c hpsa: fix a couple pci id table mistakes 2015-06-24 09:43:06 +02:00
hpsa.h [SCSI] hpsa: remove unneeded variable 2013-08-26 12:51:31 +04:00
hptiop.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
hptiop.h [SCSI] hptiop: Support HighPoint RR4520/RR4522 HBA 2012-11-27 08:59:43 +04:00
imm.c imm: switch to ->show_info() 2013-04-09 14:13:16 -04:00
imm.h
in2000.c in2000: switch to ->show_info() 2013-04-09 14:13:25 -04:00
in2000.h
initio.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
initio.h Fix common misspellings 2011-03-31 11:26:23 -03:00
ipr.c ipr: Clear interrupt on croc/crocodile when running with LSI 2016-08-19 09:50:59 +02:00
ipr.h ipr: Fix incorrect trace indexing 2015-08-19 08:36:48 +02:00
ips.c SCSI: Disable WRITE SAME for RAID and virtual host adapter drivers 2013-12-11 22:37:55 -08:00
ips.h ips: switch to ->show_info() 2013-04-09 14:13:27 -04:00
iscsi_boot_sysfs.c switch ->is_visible() to returning umode_t 2012-01-03 22:54:55 -05:00
iscsi_tcp.c [SCSI] iscsi_tcp: support PF_MEMALLOC/__GFP_MEMALLOC 2013-04-11 16:55:04 -07:00
iscsi_tcp.h
jazz_esp.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
Kconfig SCSI misc on 20130903 2013-09-03 15:48:06 -07:00
lasi700.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
libiscsi_tcp.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-07-09 18:24:39 -07:00
libiscsi.c SCSI: libiscsi: fix potential buffer overrun in __iscsi_conn_send_pdu 2014-10-13 15:41:18 +02:00
libsrp.c scsi: Fix up files implicitly depending on module.h inclusion 2011-10-31 19:31:24 -04:00
mac_esp.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
mac_scsi.c NCR5830: switch to ->show_info() 2013-04-09 14:13:17 -04:00
mac_scsi.h NCR5830: switch to ->show_info() 2013-04-09 14:13:17 -04:00
mac53c94.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
mac53c94.h
Makefile [SCSI] esas2r: ATTO Technology ExpressSAS 6G SAS/SATA RAID Adapter Driver 2013-09-03 07:27:58 -07:00
megaraid.c scsi: correct return values for .eh_abort_handler implementations 2015-01-07 16:24:09 +01:00
megaraid.h megaraid: Don't use create_proc_read_entry() 2013-04-29 15:41:57 -04:00
mesh.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
mesh.h
mvme16x_scsi.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
mvme147.c switch wd33c93 to ->show_info() 2013-04-09 14:13:15 -04:00
mvme147.h
mvumi.c [SCSI] mvumi: Use PCI_VENDOR_ID_MARVELL_EXT for 0x1b4b 2013-04-15 14:30:44 -06:00
mvumi.h [SCSI] mvumi: Use PCI_VENDOR_ID_MARVELL_EXT for 0x1b4b 2013-04-15 14:30:44 -06:00
NCR_D700.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
NCR_D700.h
NCR_Q720.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
NCR_Q720.h
ncr53c8xx.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ncr53c8xx.h
NCR53c406a.c
NCR5380.c scsi: correct return values for .eh_abort_handler implementations 2015-01-07 16:24:09 +01:00
NCR5380.h NCR5830: switch to ->show_info() 2013-04-09 14:13:17 -04:00
nsp32_debug.c treewide: fix a few typos in comments 2011-05-10 10:16:21 +02:00
nsp32_io.h
nsp32.c [SCSI] nsp32: use mdelay instead of large udelay constants 2013-06-19 17:53:35 +02:00
nsp32.h Fix common misspellings 2011-03-31 11:26:23 -03:00
osst_detect.h
osst_options.h
osst.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
osst.h Fix common misspellings 2011-03-31 11:26:23 -03:00
pas16.c NCR5830: switch to ->show_info() 2013-04-09 14:13:17 -04:00
pas16.h NCR5830: switch to ->show_info() 2013-04-09 14:13:17 -04:00
pmcraid.c SCSI: Disable WRITE SAME for RAID and virtual host adapter drivers 2013-12-11 22:37:55 -08:00
pmcraid.h scsi: Fix typo in pmcraid.h 2012-02-21 11:40:37 +01:00
ppa.c ppa: switch to ->show_info() 2013-04-09 14:13:17 -04:00
ppa.h
ps3rom.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
qla1280.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
qla1280.h
qlogicfas.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
qlogicfas408.c
qlogicfas408.h
qlogicpti.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
qlogicpti.h
raid_class.c
script_asm.pl
scsi_debug.c scsi: scsi_debug: Fix memory leak if LBP enabled and module is unloaded 2016-11-24 16:23:30 +01:00
scsi_devinfo.c SCSI: Add Marvell Console to VPD blacklist 2016-02-24 10:23:29 +01:00
scsi_error.c scsi: fix race between simultaneous decrements of ->host_failed 2016-08-19 09:50:51 +02:00
scsi_ioctl.c
scsi_lib_dma.c scsi: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required 2011-10-31 19:31:23 -04:00
scsi_lib.c scsi: don't BUG_ON() empty DMA transfers 2017-03-01 10:38:14 +01:00
scsi_logging.h
scsi_module.c
scsi_netlink.c net: Use netlink_ns_capable to verify the permisions of netlink messages 2014-06-23 10:27:57 +02:00
scsi_pm.c PM / Runtime: Rework the "runtime idle" helper routine 2013-06-03 21:49:52 +02:00
scsi_priv.h [SCSI] async: introduce 'async_domain' type 2012-07-20 09:05:54 +01:00
scsi_proc.c fix buffer leak after "scsi: saner replacements for ->proc_info()" 2013-05-31 15:16:51 -04:00
scsi_sas_internal.h
scsi_scan.c scsi: Fix use-after-free 2016-10-28 20:37:00 +02:00
scsi_sysctl.c
scsi_sysfs.c scsi: avoid a permanent stop of the scsi device's request queue 2017-01-26 17:39:06 +01:00
scsi_tgt_if.c scsi: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required 2011-10-31 19:31:23 -04:00
scsi_tgt_lib.c [SCSI] esp, scsi_tgt_lib, fcoe: use list_move() instead of list_del()/list_add() combination 2011-05-01 10:20:10 -05:00
scsi_tgt_priv.h
scsi_trace.c [SCSI] scsi_trace: Decode UNMAP bit in WRITE SAME(10) 2011-05-24 12:38:36 -04:00
scsi_transport_api.h
scsi_transport_fc_internal.h
scsi_transport_fc.c drivers: avoid format strings in names passed to alloc_workqueue() 2013-07-03 16:07:41 -07:00
scsi_transport_iscsi.c [SCSI] scsi_transport_iscsi: Exporting new attrs for iscsi session and connection in sysfs 2013-08-23 13:08:30 -04:00
scsi_transport_sas.c SCSI: scsi_transport_sas: move bsg destructor into sas_rphy_remove 2014-06-20 17:33:57 +02:00
scsi_transport_spi.c [SCSI] scsi_transport_spi: fix for unbalanced reference counting 2012-05-10 09:06:12 +01:00
scsi_transport_srp_internal.h
scsi_transport_srp.c IB/srp: Allow SRP disconnect through sysfs 2012-11-30 17:40:33 -08:00
scsi_typedefs.h
scsi.c [SCSI] Don't attempt to send extended INQUIRY command if skip_vpd_pages is set 2013-08-02 13:20:21 -07:00
scsi.h
scsicam.c fs: move code out of buffer.c 2012-01-03 22:54:07 -05:00
sd_dif.c [SCSI] sd_dif: problem with verify of type 1 protection information (PI) 2013-05-02 15:37:03 -07:00
sd.c scsi: sd: Fix capacity calculation with 32-bit sector_t 2017-04-28 19:30:45 +02:00
sd.h [SCSI] sd: Update WRITE SAME heuristics 2013-06-26 17:56:18 -07:00
ses.c ses: fix additional element traversal bug 2016-03-03 12:46:00 +01:00
sg.c sg: Fix double-free when drives detach during SG_IO 2017-01-27 17:14:58 +01:00
sgiwd93.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
sim710.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
sni_53c710.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
sr_ioctl.c scsi: Fix up files implicitly depending on module.h inclusion 2011-10-31 19:31:24 -04:00
sr_vendor.c
sr.c scsi: sr: Sanity check returned mode data 2017-04-28 19:30:44 +02:00
sr.h [SCSI] sr: check_events() ignore GET_EVENT when TUR says otherwise 2011-07-21 14:15:58 -07:00
st_options.h
st.c st: null pointer dereference panic caused by use after kref_put by st_open 2015-08-19 08:36:36 +02:00
st.h [SCSI] st: raise device limit 2012-09-14 17:59:29 +01:00
stex.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
storvsc_drv.c scsi: storvsc: properly set residual data length on errors 2017-03-13 21:40:27 +01:00
sun_esp.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
sun3_NCR5380.c scsi: correct return values for .eh_abort_handler implementations 2015-01-07 16:24:09 +01:00
sun3_scsi_vme.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
sun3_scsi.c sun3_scsi: add ->show_info() 2013-05-04 14:50:16 -04:00
sun3_scsi.h sun3_scsi: add ->show_info() 2013-05-04 14:50:16 -04:00
sun3x_esp.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
sym53c416.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
sym53c416.h
t128.c NCR5830: switch to ->show_info() 2013-04-09 14:13:17 -04:00
t128.h NCR5830: switch to ->show_info() 2013-04-09 14:13:17 -04:00
tmscsim.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
tmscsim.h
u14-34f.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ultrastor.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ultrastor.h
virtio_scsi.c virtio-scsi: fix various bad behavior on aborted requests 2014-07-17 15:04:33 +02:00
vmw_pvscsi.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
vmw_pvscsi.h [SCSI] vmw_pvscsi: Try setting host->max_id as suggested by the device. 2012-03-27 08:26:36 +01:00
wd33c93.c switch wd33c93 to ->show_info() 2013-04-09 14:13:15 -04:00
wd33c93.h switch wd33c93 to ->show_info() 2013-04-09 14:13:15 -04:00
wd7000.c wd7000: switch to ->show_info() 2013-04-09 14:13:15 -04:00
zalon.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
zorro7xx.c Drivers: scsi: remove __dev* attributes. 2013-01-03 15:57:01 -08:00