+ libata-simulate-report-luns-for-atapi-devices.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     libata: simulate REPORT LUNS for ATAPI devices
has been added to the -mm tree.  Its filename is
     libata-simulate-report-luns-for-atapi-devices.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: libata: simulate REPORT LUNS for ATAPI devices
From: "Darrick J. Wong" <djwong@xxxxxxxxxx>

The Quantum GoVault SATAPI removable disk device returns ATA_ERR in
response to a REPORT LUNS packet.  If this happens to an ATAPI device that
is attached to a SAS controller (this is the case with sas_ata), the device
does not load because SCSI won't touch a "SCSI device" that won't report
its LUNs.  Since most ATAPI devices don't support multiple LUNs anyway, we
might as well fake a response like we do for ATA devices.

Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/ata/libata-scsi.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff -puN drivers/ata/libata-scsi.c~libata-simulate-report-luns-for-atapi-devices drivers/ata/libata-scsi.c
--- a/drivers/ata/libata-scsi.c~libata-simulate-report-luns-for-atapi-devices
+++ a/drivers/ata/libata-scsi.c
@@ -2715,8 +2715,13 @@ static inline int __ata_scsi_queuecmd(st
 			rc = ata_scsi_translate(dev, cmd, done, xlat_func);
 		else
 			ata_scsi_simulate(dev, cmd, done);
-	} else
-		rc = ata_scsi_translate(dev, cmd, done, atapi_xlat);
+	} else {
+		/* Simulate REPORT LUNS for ATAPI devices */
+		if (cmd->cmnd[0] == REPORT_LUNS)
+			ata_scsi_simulate(dev, cmd, done);
+		else
+			rc = ata_scsi_translate(dev, cmd, done, atapi_xlat);
+	}
 
 	return rc;
 }
_

Patches currently in -mm which might be from djwong@xxxxxxxxxx are

libata-simulate-report-luns-for-atapi-devices.patch
git-scsi-misc.patch
git-sas.patch
git-sas-kconfig-fix.patch
aic94xx-dont-call-pci_map_sg-for-already-mapped-scatterlists.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux