diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/Kconfig | 5 | ||||
-rw-r--r-- | drivers/scsi/a100u2w.c | 2 | ||||
-rw-r--r-- | drivers/scsi/arm/eesox.c | 2 | ||||
-rw-r--r-- | drivers/scsi/ide-scsi.c | 8 | ||||
-rw-r--r-- | drivers/scsi/osst.c | 12 | ||||
-rw-r--r-- | drivers/scsi/scsi_scan.c | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_fc.c | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_sas.c | 4 | ||||
-rw-r--r-- | drivers/scsi/sd.c | 11 | ||||
-rw-r--r-- | drivers/scsi/st.c | 38 | ||||
-rw-r--r-- | drivers/scsi/sym53c8xx_2/sym_fw1.h | 4 | ||||
-rw-r--r-- | drivers/scsi/sym53c8xx_2/sym_fw2.h | 4 |
12 files changed, 48 insertions, 46 deletions
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index 5bf3f07870ba..4cd280e86966 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig | |||
@@ -230,6 +230,7 @@ config SCSI_SCAN_ASYNC | |||
230 | The SCSI subsystem can probe for devices while the rest of the | 230 | The SCSI subsystem can probe for devices while the rest of the |
231 | system continues booting, and even probe devices on different | 231 | system continues booting, and even probe devices on different |
232 | busses in parallel, leading to a significant speed-up. | 232 | busses in parallel, leading to a significant speed-up. |
233 | |||
233 | If you have built SCSI as modules, enabling this option can | 234 | If you have built SCSI as modules, enabling this option can |
234 | be a problem as the devices may not have been found by the | 235 | be a problem as the devices may not have been found by the |
235 | time your system expects them to have been. You can load the | 236 | time your system expects them to have been. You can load the |
@@ -237,8 +238,8 @@ config SCSI_SCAN_ASYNC | |||
237 | If you build your SCSI drivers into the kernel, then everything | 238 | If you build your SCSI drivers into the kernel, then everything |
238 | will work fine if you say Y here. | 239 | will work fine if you say Y here. |
239 | 240 | ||
240 | You can override this choice by specifying scsi_mod.scan="sync" | 241 | You can override this choice by specifying "scsi_mod.scan=sync" |
241 | or "async" on the kernel's command line. | 242 | or async on the kernel's command line. |
242 | 243 | ||
243 | menu "SCSI Transports" | 244 | menu "SCSI Transports" |
244 | depends on SCSI | 245 | depends on SCSI |
diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c index 2650a5d0a161..7f4241bfb9c4 100644 --- a/drivers/scsi/a100u2w.c +++ b/drivers/scsi/a100u2w.c | |||
@@ -1067,7 +1067,7 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev, | |||
1067 | goto out_disable_device; | 1067 | goto out_disable_device; |
1068 | } | 1068 | } |
1069 | 1069 | ||
1070 | /* <02> read from base address + 0x50 offset to get the bios balue. */ | 1070 | /* <02> read from base address + 0x50 offset to get the bios value. */ |
1071 | bios = ORC_RDWORD(port, 0x50); | 1071 | bios = ORC_RDWORD(port, 0x50); |
1072 | 1072 | ||
1073 | 1073 | ||
diff --git a/drivers/scsi/arm/eesox.c b/drivers/scsi/arm/eesox.c index 4677152142d9..d4136524fc46 100644 --- a/drivers/scsi/arm/eesox.c +++ b/drivers/scsi/arm/eesox.c | |||
@@ -196,7 +196,7 @@ static void eesoxscsi_buffer_in(void *buf, int length, void __iomem *base) | |||
196 | const void __iomem *reg_fas = base + EESOX_FAS216_OFFSET; | 196 | const void __iomem *reg_fas = base + EESOX_FAS216_OFFSET; |
197 | const void __iomem *reg_dmastat = base + EESOX_DMASTAT; | 197 | const void __iomem *reg_dmastat = base + EESOX_DMASTAT; |
198 | const void __iomem *reg_dmadata = base + EESOX_DMADATA; | 198 | const void __iomem *reg_dmadata = base + EESOX_DMADATA; |
199 | const register unsigned long mask = 0xffff; | 199 | register const unsigned long mask = 0xffff; |
200 | 200 | ||
201 | do { | 201 | do { |
202 | unsigned int status; | 202 | unsigned int status; |
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 8f6b5bf580f6..2b5b8a93bc10 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c | |||
@@ -801,15 +801,10 @@ static int idescsi_ide_open(struct inode *inode, struct file *filp) | |||
801 | { | 801 | { |
802 | struct gendisk *disk = inode->i_bdev->bd_disk; | 802 | struct gendisk *disk = inode->i_bdev->bd_disk; |
803 | struct ide_scsi_obj *scsi; | 803 | struct ide_scsi_obj *scsi; |
804 | ide_drive_t *drive; | ||
805 | 804 | ||
806 | if (!(scsi = ide_scsi_get(disk))) | 805 | if (!(scsi = ide_scsi_get(disk))) |
807 | return -ENXIO; | 806 | return -ENXIO; |
808 | 807 | ||
809 | drive = scsi->drive; | ||
810 | |||
811 | drive->usage++; | ||
812 | |||
813 | return 0; | 808 | return 0; |
814 | } | 809 | } |
815 | 810 | ||
@@ -817,9 +812,6 @@ static int idescsi_ide_release(struct inode *inode, struct file *filp) | |||
817 | { | 812 | { |
818 | struct gendisk *disk = inode->i_bdev->bd_disk; | 813 | struct gendisk *disk = inode->i_bdev->bd_disk; |
819 | struct ide_scsi_obj *scsi = ide_scsi_g(disk); | 814 | struct ide_scsi_obj *scsi = ide_scsi_g(disk); |
820 | ide_drive_t *drive = scsi->drive; | ||
821 | |||
822 | drive->usage--; | ||
823 | 815 | ||
824 | ide_scsi_put(scsi); | 816 | ide_scsi_put(scsi); |
825 | 817 | ||
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index 9668b73872c7..a967fadb7439 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c | |||
@@ -5574,14 +5574,14 @@ static ssize_t osst_version_show(struct device_driver *ddd, char *buf) | |||
5574 | 5574 | ||
5575 | static DRIVER_ATTR(version, S_IRUGO, osst_version_show, NULL); | 5575 | static DRIVER_ATTR(version, S_IRUGO, osst_version_show, NULL); |
5576 | 5576 | ||
5577 | static int osst_create_driverfs_files(struct device_driver *driverfs) | 5577 | static int osst_create_sysfs_files(struct device_driver *sysfs) |
5578 | { | 5578 | { |
5579 | return driver_create_file(driverfs, &driver_attr_version); | 5579 | return driver_create_file(sysfs, &driver_attr_version); |
5580 | } | 5580 | } |
5581 | 5581 | ||
5582 | static void osst_remove_driverfs_files(struct device_driver *driverfs) | 5582 | static void osst_remove_sysfs_files(struct device_driver *sysfs) |
5583 | { | 5583 | { |
5584 | driver_remove_file(driverfs, &driver_attr_version); | 5584 | driver_remove_file(sysfs, &driver_attr_version); |
5585 | } | 5585 | } |
5586 | 5586 | ||
5587 | /* | 5587 | /* |
@@ -5953,7 +5953,7 @@ static int __init init_osst(void) | |||
5953 | if (err) | 5953 | if (err) |
5954 | goto err_out_chrdev; | 5954 | goto err_out_chrdev; |
5955 | 5955 | ||
5956 | err = osst_create_driverfs_files(&osst_template.gendrv); | 5956 | err = osst_create_sysfs_files(&osst_template.gendrv); |
5957 | if (err) | 5957 | if (err) |
5958 | goto err_out_scsidrv; | 5958 | goto err_out_scsidrv; |
5959 | 5959 | ||
@@ -5973,7 +5973,7 @@ static void __exit exit_osst (void) | |||
5973 | int i; | 5973 | int i; |
5974 | struct osst_tape * STp; | 5974 | struct osst_tape * STp; |
5975 | 5975 | ||
5976 | osst_remove_driverfs_files(&osst_template.gendrv); | 5976 | osst_remove_sysfs_files(&osst_template.gendrv); |
5977 | scsi_unregister_driver(&osst_template.gendrv); | 5977 | scsi_unregister_driver(&osst_template.gendrv); |
5978 | unregister_chrdev(OSST_MAJOR, "osst"); | 5978 | unregister_chrdev(OSST_MAJOR, "osst"); |
5979 | osst_sysfs_cleanup(); | 5979 | osst_sysfs_cleanup(); |
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index a43b9ec3aefd..d6fe756eb371 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
@@ -54,7 +54,7 @@ | |||
54 | #define SCSI_TIMEOUT (2*HZ) | 54 | #define SCSI_TIMEOUT (2*HZ) |
55 | 55 | ||
56 | /* | 56 | /* |
57 | * Prefix values for the SCSI id's (stored in driverfs name field) | 57 | * Prefix values for the SCSI id's (stored in sysfs name field) |
58 | */ | 58 | */ |
59 | #define SCSI_UID_SER_NUM 'S' | 59 | #define SCSI_UID_SER_NUM 'S' |
60 | #define SCSI_UID_UNKNOWN 'Z' | 60 | #define SCSI_UID_UNKNOWN 'Z' |
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 0d3c10f2134c..58afdb401703 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c | |||
@@ -855,7 +855,7 @@ static FC_CLASS_DEVICE_ATTR(rport, fast_io_fail_tmo, S_IRUGO | S_IWUSR, | |||
855 | 855 | ||
856 | /* | 856 | /* |
857 | * Note: in the target show function we recognize when the remote | 857 | * Note: in the target show function we recognize when the remote |
858 | * port is in the heirarchy and do not allow the driver to get | 858 | * port is in the hierarchy and do not allow the driver to get |
859 | * involved in sysfs functions. The driver only gets involved if | 859 | * involved in sysfs functions. The driver only gets involved if |
860 | * it's the "old" style that doesn't use rports. | 860 | * it's the "old" style that doesn't use rports. |
861 | */ | 861 | */ |
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index 6d39150e205b..b2ef71a86292 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c | |||
@@ -500,7 +500,7 @@ struct sas_phy *sas_phy_alloc(struct device *parent, int number) | |||
500 | EXPORT_SYMBOL(sas_phy_alloc); | 500 | EXPORT_SYMBOL(sas_phy_alloc); |
501 | 501 | ||
502 | /** | 502 | /** |
503 | * sas_phy_add -- add a SAS PHY to the device hierachy | 503 | * sas_phy_add -- add a SAS PHY to the device hierarchy |
504 | * @phy: The PHY to be added | 504 | * @phy: The PHY to be added |
505 | * | 505 | * |
506 | * Publishes a SAS PHY to the rest of the system. | 506 | * Publishes a SAS PHY to the rest of the system. |
@@ -1265,7 +1265,7 @@ struct sas_rphy *sas_expander_alloc(struct sas_port *parent, | |||
1265 | EXPORT_SYMBOL(sas_expander_alloc); | 1265 | EXPORT_SYMBOL(sas_expander_alloc); |
1266 | 1266 | ||
1267 | /** | 1267 | /** |
1268 | * sas_rphy_add -- add a SAS remote PHY to the device hierachy | 1268 | * sas_rphy_add -- add a SAS remote PHY to the device hierarchy |
1269 | * @rphy: The remote PHY to be added | 1269 | * @rphy: The remote PHY to be added |
1270 | * | 1270 | * |
1271 | * Publishes a SAS remote PHY to the rest of the system. | 1271 | * Publishes a SAS remote PHY to the rest of the system. |
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 3f048bd6326d..5a8f55fea5ff 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -1269,9 +1269,18 @@ repeat: | |||
1269 | 1269 | ||
1270 | /* Some devices return the total number of sectors, not the | 1270 | /* Some devices return the total number of sectors, not the |
1271 | * highest sector number. Make the necessary adjustment. */ | 1271 | * highest sector number. Make the necessary adjustment. */ |
1272 | if (sdp->fix_capacity) | 1272 | if (sdp->fix_capacity) { |
1273 | --sdkp->capacity; | 1273 | --sdkp->capacity; |
1274 | 1274 | ||
1275 | /* Some devices have version which report the correct sizes | ||
1276 | * and others which do not. We guess size according to a heuristic | ||
1277 | * and err on the side of lowering the capacity. */ | ||
1278 | } else { | ||
1279 | if (sdp->guess_capacity) | ||
1280 | if (sdkp->capacity & 0x01) /* odd sizes are odd */ | ||
1281 | --sdkp->capacity; | ||
1282 | } | ||
1283 | |||
1275 | got_data: | 1284 | got_data: |
1276 | if (sector_size == 0) { | 1285 | if (sector_size == 0) { |
1277 | sector_size = 512; | 1286 | sector_size = 512; |
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 3d2e02381e92..98d8411bbccc 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -195,8 +195,8 @@ static int sgl_unmap_user_pages(struct scatterlist *, const unsigned int, int); | |||
195 | static int st_probe(struct device *); | 195 | static int st_probe(struct device *); |
196 | static int st_remove(struct device *); | 196 | static int st_remove(struct device *); |
197 | 197 | ||
198 | static int do_create_driverfs_files(void); | 198 | static int do_create_sysfs_files(void); |
199 | static void do_remove_driverfs_files(void); | 199 | static void do_remove_sysfs_files(void); |
200 | static int do_create_class_files(struct scsi_tape *, int, int); | 200 | static int do_create_class_files(struct scsi_tape *, int, int); |
201 | 201 | ||
202 | static struct scsi_driver st_template = { | 202 | static struct scsi_driver st_template = { |
@@ -4193,7 +4193,7 @@ static int __init init_st(void) | |||
4193 | if (err) | 4193 | if (err) |
4194 | goto err_chrdev; | 4194 | goto err_chrdev; |
4195 | 4195 | ||
4196 | err = do_create_driverfs_files(); | 4196 | err = do_create_sysfs_files(); |
4197 | if (err) | 4197 | if (err) |
4198 | goto err_scsidrv; | 4198 | goto err_scsidrv; |
4199 | 4199 | ||
@@ -4211,7 +4211,7 @@ err_class: | |||
4211 | 4211 | ||
4212 | static void __exit exit_st(void) | 4212 | static void __exit exit_st(void) |
4213 | { | 4213 | { |
4214 | do_remove_driverfs_files(); | 4214 | do_remove_sysfs_files(); |
4215 | scsi_unregister_driver(&st_template.gendrv); | 4215 | scsi_unregister_driver(&st_template.gendrv); |
4216 | unregister_chrdev_region(MKDEV(SCSI_TAPE_MAJOR, 0), | 4216 | unregister_chrdev_region(MKDEV(SCSI_TAPE_MAJOR, 0), |
4217 | ST_MAX_TAPE_ENTRIES); | 4217 | ST_MAX_TAPE_ENTRIES); |
@@ -4249,43 +4249,43 @@ static ssize_t st_version_show(struct device_driver *ddd, char *buf) | |||
4249 | } | 4249 | } |
4250 | static DRIVER_ATTR(version, S_IRUGO, st_version_show, NULL); | 4250 | static DRIVER_ATTR(version, S_IRUGO, st_version_show, NULL); |
4251 | 4251 | ||
4252 | static int do_create_driverfs_files(void) | 4252 | static int do_create_sysfs_files(void) |
4253 | { | 4253 | { |
4254 | struct device_driver *driverfs = &st_template.gendrv; | 4254 | struct device_driver *sysfs = &st_template.gendrv; |
4255 | int err; | 4255 | int err; |
4256 | 4256 | ||
4257 | err = driver_create_file(driverfs, &driver_attr_try_direct_io); | 4257 | err = driver_create_file(sysfs, &driver_attr_try_direct_io); |
4258 | if (err) | 4258 | if (err) |
4259 | return err; | 4259 | return err; |
4260 | err = driver_create_file(driverfs, &driver_attr_fixed_buffer_size); | 4260 | err = driver_create_file(sysfs, &driver_attr_fixed_buffer_size); |
4261 | if (err) | 4261 | if (err) |
4262 | goto err_try_direct_io; | 4262 | goto err_try_direct_io; |
4263 | err = driver_create_file(driverfs, &driver_attr_max_sg_segs); | 4263 | err = driver_create_file(sysfs, &driver_attr_max_sg_segs); |
4264 | if (err) | 4264 | if (err) |
4265 | goto err_attr_fixed_buf; | 4265 | goto err_attr_fixed_buf; |
4266 | err = driver_create_file(driverfs, &driver_attr_version); | 4266 | err = driver_create_file(sysfs, &driver_attr_version); |
4267 | if (err) | 4267 | if (err) |
4268 | goto err_attr_max_sg; | 4268 | goto err_attr_max_sg; |
4269 | 4269 | ||
4270 | return 0; | 4270 | return 0; |
4271 | 4271 | ||
4272 | err_attr_max_sg: | 4272 | err_attr_max_sg: |
4273 | driver_remove_file(driverfs, &driver_attr_max_sg_segs); | 4273 | driver_remove_file(sysfs, &driver_attr_max_sg_segs); |
4274 | err_attr_fixed_buf: | 4274 | err_attr_fixed_buf: |
4275 | driver_remove_file(driverfs, &driver_attr_fixed_buffer_size); | 4275 | driver_remove_file(sysfs, &driver_attr_fixed_buffer_size); |
4276 | err_try_direct_io: | 4276 | err_try_direct_io: |
4277 | driver_remove_file(driverfs, &driver_attr_try_direct_io); | 4277 | driver_remove_file(sysfs, &driver_attr_try_direct_io); |
4278 | return err; | 4278 | return err; |
4279 | } | 4279 | } |
4280 | 4280 | ||
4281 | static void do_remove_driverfs_files(void) | 4281 | static void do_remove_sysfs_files(void) |
4282 | { | 4282 | { |
4283 | struct device_driver *driverfs = &st_template.gendrv; | 4283 | struct device_driver *sysfs = &st_template.gendrv; |
4284 | 4284 | ||
4285 | driver_remove_file(driverfs, &driver_attr_version); | 4285 | driver_remove_file(sysfs, &driver_attr_version); |
4286 | driver_remove_file(driverfs, &driver_attr_max_sg_segs); | 4286 | driver_remove_file(sysfs, &driver_attr_max_sg_segs); |
4287 | driver_remove_file(driverfs, &driver_attr_fixed_buffer_size); | 4287 | driver_remove_file(sysfs, &driver_attr_fixed_buffer_size); |
4288 | driver_remove_file(driverfs, &driver_attr_try_direct_io); | 4288 | driver_remove_file(sysfs, &driver_attr_try_direct_io); |
4289 | } | 4289 | } |
4290 | 4290 | ||
4291 | 4291 | ||
diff --git a/drivers/scsi/sym53c8xx_2/sym_fw1.h b/drivers/scsi/sym53c8xx_2/sym_fw1.h index 7b39f4a35e98..7b08d6caaa99 100644 --- a/drivers/scsi/sym53c8xx_2/sym_fw1.h +++ b/drivers/scsi/sym53c8xx_2/sym_fw1.h | |||
@@ -1020,7 +1020,7 @@ static struct SYM_FWA_SCR SYM_FWA_SCR = { | |||
1020 | * It shall be a tagged command. | 1020 | * It shall be a tagged command. |
1021 | * Read SIMPLE+TAG. | 1021 | * Read SIMPLE+TAG. |
1022 | * The C code will deal with errors. | 1022 | * The C code will deal with errors. |
1023 | * Agressive optimization, is'nt it? :) | 1023 | * Aggressive optimization, isn't it? :) |
1024 | */ | 1024 | */ |
1025 | SCR_MOVE_ABS (2) ^ SCR_MSG_IN, | 1025 | SCR_MOVE_ABS (2) ^ SCR_MSG_IN, |
1026 | HADDR_1 (msgin), | 1026 | HADDR_1 (msgin), |
@@ -1044,7 +1044,7 @@ static struct SYM_FWA_SCR SYM_FWA_SCR = { | |||
1044 | RADDR_1 (dsa), | 1044 | RADDR_1 (dsa), |
1045 | /* | 1045 | /* |
1046 | * The SIDL still contains the TAG value. | 1046 | * The SIDL still contains the TAG value. |
1047 | * Agressive optimization, isn't it? :):) | 1047 | * Aggressive optimization, isn't it? :):) |
1048 | */ | 1048 | */ |
1049 | SCR_REG_SFBR (sidl, SCR_SHL, 0), | 1049 | SCR_REG_SFBR (sidl, SCR_SHL, 0), |
1050 | 0, | 1050 | 0, |
diff --git a/drivers/scsi/sym53c8xx_2/sym_fw2.h b/drivers/scsi/sym53c8xx_2/sym_fw2.h index 851f2706f220..6e5b952312e3 100644 --- a/drivers/scsi/sym53c8xx_2/sym_fw2.h +++ b/drivers/scsi/sym53c8xx_2/sym_fw2.h | |||
@@ -956,7 +956,7 @@ static struct SYM_FWA_SCR SYM_FWA_SCR = { | |||
956 | * It shall be a tagged command. | 956 | * It shall be a tagged command. |
957 | * Read SIMPLE+TAG. | 957 | * Read SIMPLE+TAG. |
958 | * The C code will deal with errors. | 958 | * The C code will deal with errors. |
959 | * Agressive optimization, is'nt it? :) | 959 | * Aggressive optimization, isn't it? :) |
960 | */ | 960 | */ |
961 | SCR_MOVE_ABS (2) ^ SCR_MSG_IN, | 961 | SCR_MOVE_ABS (2) ^ SCR_MSG_IN, |
962 | HADDR_1 (msgin), | 962 | HADDR_1 (msgin), |
@@ -968,7 +968,7 @@ static struct SYM_FWA_SCR SYM_FWA_SCR = { | |||
968 | offsetof(struct sym_lcb, head.itlq_tbl_sa), | 968 | offsetof(struct sym_lcb, head.itlq_tbl_sa), |
969 | /* | 969 | /* |
970 | * The SIDL still contains the TAG value. | 970 | * The SIDL still contains the TAG value. |
971 | * Agressive optimization, isn't it? :):) | 971 | * Aggressive optimization, isn't it? :):) |
972 | */ | 972 | */ |
973 | SCR_REG_SFBR (sidl, SCR_SHL, 0), | 973 | SCR_REG_SFBR (sidl, SCR_SHL, 0), |
974 | 0, | 974 | 0, |