Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 165453
Collapse All | Expand All

(-)file_not_specified_in_diff (-9 / +2 lines)
Line  Link Here
0
-- orig/src/satacmds.c
0
++ mod/src/satacmds.c
Lines 54-60 Link Here
54
  unsigned char cdb[16];
54
  unsigned char cdb[16];
55
  unsigned char sense[32];
55
  unsigned char sense[32];
56
  int dxfer_direction;
56
  int dxfer_direction;
57
  int ret;
58
  
57
  
59
  memset(cdb, 0, sizeof(cdb));
58
  memset(cdb, 0, sizeof(cdb));
60
  cdb[0] = ATA_16;
59
  cdb[0] = ATA_16;
Lines 78-90 Link Here
78
    cdb[6] = cmd[1];
77
    cdb[6] = cmd[1];
79
  cdb[14] = cmd[0];
78
  cdb[14] = cmd[0];
80
79
81
  ret = scsi_SG_IO(device, cdb, sizeof(cdb), buffer, cmd[3] * 512, sense, sizeof(sense), dxfer_direction);
80
  return scsi_SG_IO(device, cdb, sizeof(cdb), buffer, cmd[3] * 512, sense, sizeof(sense), dxfer_direction);
82
 
83
  /* Verify SATA magics */
84
  if (sense[0] != 0x72 || sense[7] != 0x0e || sense[9] != 0x0e || sense[10] != 0x00)
85
    return 1;		  
86
  else 
87
    return ret;
88
}
81
}
89
82
90
void sata_fixstring(unsigned char *s, int bytecount)
83
void sata_fixstring(unsigned char *s, int bytecount)

Return to bug 165453