login
Header Space

 
 

Re: [PATCH] mass storage : emulation of sat scsi_pass_thru with ATACB

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <mdharm-kernel@...>, <linux-usb@...>, Linux Kernel list <linux-kernel@...>
Date: Saturday, March 8, 2008 - 4:08 pm

Hi Matthew,

thanks for your comments

Matthew Dharm wrote:
Because using a new protocol code means I need to patch all the place 
where there is a comparison between us->subclass and US_SC_SCSI.
After all I am US_SC_SCSI with a special case for ATA12 & ATA16 commands.
I don't translate all scsi to atacb (that's what does US_SC_ISD200).

Ok, I will move it in another file.
What do you means by having a separate 'dispatcher' function?
You means why I have 2 functions emulate_pass_thru_with_atacb and 
usb_stor_transparent_scsi_command_atacb ?
I did 2 functions for having a code more clean.

You suggest something like
void usb_stor_transparent_scsi_command_atacb(struct scsi_cmnd *srb,
                        struct us_data *us)
{
     if (srb->cmnd[0] != ATA_16 && srb->cmnd[0] != ATA_12) {
         usb_stor_invoke_transport(srb, us);
         return;
     }
     copy emulate_pass_thru_with_atacb code here
}

But 'emulate_pass_thru_with_atacb' only handle ATA pass_thru scsi 
commands. It doesn't translate all scsi commands to atacb like 
'cypress_atacb' could suggest.
That's why I put 'usb_stor_transparent_scsi_command_atacb' saying it is 
transparent_scsi_command + atacb support.

Matthieu
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] mass storage : emulation of sat scsi_pass_thru ..., matthieu castet, (Sat Mar 8, 4:08 pm)
speck-geostationary