Re: question about drivers/scsi/libsas/sas_ata.c

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

 



On Tue, Sep 22, 2009 at 01:59:50PM +0200, Julia Lawall wrote:
> The function sas_ata_task_done in the file drivers/scsi/libsas/sas_ata.c 
> contains the following code:
> 
> 	if (stat->stat == SAS_PROTO_RESPONSE || stat->stat == SAM_GOOD) {
> 		ata_tf_from_fis(resp->ending_fis, &dev->sata_dev.tf);
> 		qc->err_mask |= ac_err_mask(dev->sata_dev.tf.command);
> 		dev->sata_dev.sstatus = resp->sstatus;
> 		dev->sata_dev.serror = resp->serror;
> 		dev->sata_dev.scontrol = resp->scontrol;
> 	} else if (stat->stat != SAM_STAT_GOOD) {
> 		ac = sas_to_ata_err(stat);
> 		if (ac) {
> 			SAS_DPRINTK("%s: SAS error %x\n", __func__,
> 				    stat->stat);
> 			/* We saw a SAS error. Send a vague error. */
> 			qc->err_mask = ac;
> 			dev->sata_dev.tf.feature = 0x04; /* status err */
> 			dev->sata_dev.tf.command = ATA_ERR;
> 		}
> 	}
> 
> Should the reference to SAM_STAT_GOOD be instead a reference to SAM_GOOD?  
> They both have the same value (0), but SAM_STAT_GOOD is defined in a 
> different file than the other constants used with stat->stat.

Yes, particularly since stat->stat is an enum that defines STAT_GOOD.  Sorry
about the fubar code from years ago.

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux