home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / aix / 13103 < prev    next >
Encoding:
Text File  |  1993-01-07  |  2.2 KB  |  51 lines

  1. Newsgroups: comp.unix.aix
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!geraldo.cc.utexas.edu!portal.austin.ibm.com!awdprime.austin.ibm.com!swan
  3. From: swan@austin.ibm.com (Randal C. Swanberg)
  4. Subject: Re: Adding SCSI OSDISK
  5. Originator: swan@swan2.austin.ibm.com
  6. Sender: news@austin.ibm.com (News id)
  7. Message-ID: <C0I05H.1A5I@austin.ibm.com>
  8. Date: Thu, 7 Jan 1993 19:15:17 GMT
  9. References: <1993Jan6.105119.1266@yvax.byu.edu> <19930107.062511.795@almaden.ibm.com>
  10. Organization: IBM
  11. Lines: 38
  12.  
  13.  
  14. In article <19930107.062511.795@almaden.ibm.com>, russotto@vnet.ibm.com (Matthew T. Russotto) writes:
  15. > Many disks have a jumper which set whether they spin-up on power-on
  16. > or only when they receive a SCSI start.  Would an request to spin up
  17. > when the disk was already spun up give that result code?
  18. > Some disks always spin up on power up, and probably wouldn't like SCSI
  19. > start at all... will such disks work with AIX?
  20.  
  21. All of the SCSI disks that we have experience with (i.e. IBM Japan 160MB, IBM
  22. Havant 857MB, IBM Rochester 320MB, 400MB, 1 GB, MAXTOR 355MB, 670MB, Seagate 1GB,
  23. ...and I'm sure there are others) basically no-op a SCSI Start-Unit if the disk
  24. is already spun-up.
  25.  
  26. If a disk will not allow a Start-Unit when already spun-up, then the answer
  27. is NO, it won't work with AIX.  The SCSI disk driver issues a Start-Unit command
  28. on the first open() to the disk.  Basically I guess the assumption that the AIX
  29. SCSI Driver makes is that a)the disk may be spun down and b)if it isn't the 
  30. Start-Unit command will be a no-op, not an error.
  31.  
  32. > How does one learn to translate those sense codes, BTW?
  33.  
  34. There may be a more elegant way available, but here is what I do:
  35.  
  36. The sense data for a SCSI device maps to the struct sc_error_log_df found
  37. in /usr/include/sys/scsi.h, minus the first to fields of the structure.  In other
  38. words, the sense data starts with the struct scsi scsi_command field of the
  39. sc_error_log_df structure.  Then look at struct scsi (also in scsi.h) and
  40. from there you can determine what bytes make up the actual command.
  41.  
  42.  
  43. -- 
  44. _____________________________________________________________________________
  45.  
  46. Randy Swanberg                                            swan@austin.ibm.com
  47. AIX Kernel Development                                    512-838-3363
  48.