]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/scsi_transport_spi.c
oom: do not dump task state for non thread group leaders
[linux-2.6-omap-h63xx.git] / drivers / scsi / scsi_transport_spi.c
index 75a64a6cae8ca873d70b259e61384b4763eed6ef..7c2d28924d2a32e6c3f840e80d6e397429dc3e1b 100644 (file)
@@ -109,7 +109,9 @@ static int spi_execute(struct scsi_device *sdev, const void *cmd,
        for(i = 0; i < DV_RETRIES; i++) {
                result = scsi_execute(sdev, cmd, dir, buffer, bufflen,
                                      sense, DV_TIMEOUT, /* retries */ 1,
-                                     REQ_FAILFAST);
+                                     REQ_FAILFAST_DEV |
+                                     REQ_FAILFAST_TRANSPORT |
+                                     REQ_FAILFAST_DRIVER);
                if (result & DRIVER_SENSE) {
                        struct scsi_sense_hdr sshdr_tmp;
                        if (!sshdr)
@@ -366,12 +368,14 @@ spi_transport_rd_attr(rti, "%d\n");
 spi_transport_rd_attr(pcomp_en, "%d\n");
 spi_transport_rd_attr(hold_mcs, "%d\n");
 
-/* we only care about the first child device so we return 1 */
+/* we only care about the first child device that's a real SCSI device
+ * so we return 1 to terminate the iteration when we find it */
 static int child_iter(struct device *dev, void *data)
 {
-       struct scsi_device *sdev = to_scsi_device(dev);
+       if (!scsi_is_sdev_device(dev))
+               return 0;
 
-       spi_dv_device(sdev);
+       spi_dv_device(to_scsi_device(dev));
        return 1;
 }