Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
"Two core fixes.

One simply moves an annotation from put to release to avoid the
warning triggering needlessly in alua, but to keep it in case release
is ever called from that path (which we don't think will happen).

The other reverts a change to the PQ=1 target scanning behaviour
that's under intense discussion at the moment"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: Revert "scsi: core: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT"
scsi: core: Fix the scsi_device_put() might_sleep annotation

+5 -6
-2
drivers/scsi/scsi.c
··· 588 588 { 589 589 struct module *mod = sdev->host->hostt->module; 590 590 591 - might_sleep(); 592 - 593 591 put_device(&sdev->sdev_gendev); 594 592 module_put(mod); 595 593 }
+3 -4
drivers/scsi/scsi_scan.c
··· 1232 1232 * that no LUN is present, so don't add sdev in these cases. 1233 1233 * Two specific examples are: 1234 1234 * 1) NetApp targets: return PQ=1, PDT=0x1f 1235 - * 2) IBM/2145 targets: return PQ=1, PDT=0 1236 - * 3) USB UFI: returns PDT=0x1f, with the PQ bits being "reserved" 1235 + * 2) USB UFI: returns PDT=0x1f, with the PQ bits being "reserved" 1237 1236 * in the UFI 1.0 spec (we cannot rely on reserved bits). 1238 1237 * 1239 1238 * References: ··· 1246 1247 * PDT=00h Direct-access device (floppy) 1247 1248 * PDT=1Fh none (no FDD connected to the requested logical unit) 1248 1249 */ 1249 - if (((result[0] >> 5) == 1 || 1250 - (starget->pdt_1f_for_no_lun && (result[0] & 0x1f) == 0x1f)) && 1250 + if (((result[0] >> 5) == 1 || starget->pdt_1f_for_no_lun) && 1251 + (result[0] & 0x1f) == 0x1f && 1251 1252 !scsi_is_wlun(lun)) { 1252 1253 SCSI_LOG_SCAN_BUS(3, sdev_printk(KERN_INFO, sdev, 1253 1254 "scsi scan: peripheral device type"
+2
drivers/scsi/scsi_sysfs.c
··· 451 451 struct scsi_vpd *vpd_pgb0 = NULL, *vpd_pgb1 = NULL, *vpd_pgb2 = NULL; 452 452 unsigned long flags; 453 453 454 + might_sleep(); 455 + 454 456 scsi_dh_release_device(sdev); 455 457 456 458 parent = sdev->sdev_gendev.parent;