2008年9月11日 星期四

scsi_execute_req

int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd,
                     int data_direction, void *buffer, unsigned bufflen,
                     struct scsi_sense_hdr *sshdr, int timeout, int retries)

scsi command code

include/scsi/scsi.h

READ_6   0x08
WRITE_6  0x0a

READ_10   0x28
WRITE_10  0x2a

READ_16   0x88
WRITE_16   0x8a

website about block driver

http://www.geocities.com/ravikiran_uvs/articles/

proc

read_proc

struct dentry *proc_lookup(struct inode * dir, struct dentry *dentry)

2008年9月10日 星期三

drivers/scsi/sd.c

the problem related to struct scsi_cmnd

2008年9月9日 星期二

struct scsi_cmnd

 /* These elements define the operation we are about to perform */
 #define MAX_COMMAND_SIZE        16
  unsigned char cmnd[MAX_COMMAND_SIZE];

2008年9月8日 星期一

sd_mod

remove sd_mod will delete /dev/sd*

2008年9月4日 星期四

struct scsi_sense_hdr

scsi_en.h

struct scsi_sense_hdr {         /* See SPC-3 section 4.5 */
          u8 response_code;       /* permit: 0x0, 0x70, 0x71, 0x72, 0x73 */
          u8 sense_key;
          u8 asc;
          u8 ascq;
          u8 byte4;
          u8 byte5;
          u8 byte6;
          u8 additional_length;   /* always 0 for fixed sense format */
  };