SCSI programming
From: Martin Vorbrodt (mvorbrodt_at_gmail.com)
Date: 10/29/05
- Next message: Kasper Dupont: "Re: difference betwen /dev/shm and /dev/mem"
- Previous message: Reinhard Gimbel: "Re: difference betwen /dev/shm and /dev/mem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 29 Oct 2005 17:39:24 GMT
i'm rather new to scsi programming. i started few weeks ago on windows using
ASPI, which as it turns out appears to be outdated. so i tried SPTI... which
as all you linux guys know is crap. so i decided to give linux a try
(considering i use linux as my primary platform at work, seams like a
reasonable thing to do). so i read up on scsi generic under linux, and it
seams ok. simple. open /dev/sgX, ioctl, read, write, close. great! once i
have a handle to SG device file, i can send my scsi commands, just like ASPI
(which i have to say, is a great API due to its simplicity). however, i'm
trying to figure few things out, mainly scsi adapter detection and device
enumeration in a way which would be portable accross kernels and distros.
ASPI alloes me to detect number of adapters, and later detect devices on
every adapter, chanel, id, lun. now, how would i go about doing the same on
linux. i would like to know that, say: i have 2 controllers, so system tells
me, ok here you go: /dev/controler1, /dev/controler2. then do something
like: /dev/controler1 probe path0, target2, lun0... and controler1 says, ok,
here you go: you got a device of type 0 (hdd). or basically do something
along those lines.
please advice!
thank you all,
martin
- Next message: Kasper Dupont: "Re: difference betwen /dev/shm and /dev/mem"
- Previous message: Reinhard Gimbel: "Re: difference betwen /dev/shm and /dev/mem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|