[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

ide device driver


I'm working on some diagrams in an attempt to help me understand how the
ide device driver
works.  Below is a general outline that shows how I plan to organize
this diagram.  I would be grateful for any advice or comments.

Level 1
1)  driver initialization
2)  error handling
3)  read operation
4)  write operation
5)  shutdown
6)  memory management
7)  event handling

Level 2 "Expanding initialization"
1)  allocate memory and establish data structures
2)  establish state information and populate data elements
3)  determine base port i/o address
4)  irq setup
5)  dma setup
6)  register with VFS: establish device major number and register
file_operations struct.
7)  initialize event handling

Level 3  "Error handling"
1)  resource availability
2)  device errors that involve:  reading, writing, timing
3)  runtime resourse errors
4)  explicit error codes
5)  overrun and under timing

Level 4 "Read"
1)  recieve event
2)  transfer argument to working space
3)  allocate buffers  "I think the buffer allocation is done by the
buffer cache"
4)  device control
5)  suspend/wait processing
6)  wakeup/housekeeping
7)  receive data
8)  kernel passes data to associated process

Level 5 "Disk driver initiates read throught disk drive controller"
1)  check status
2)  setup dma channel
3)  associate device with buffer channel
4)  load device control register:  dma channel, cmd, logical link
5)  sync action

I'm hoping that someone will be able to look at this and provide me with
some feedback.  I' trying to work on a school project that involves
adaptive block rearrangment.  The problem is that I've never had any
experience with systems programming.  I think the construction of such a
diagram "except this one needs to be correct" would be extremely
helpful.  As I go through ide.c, I can associate each routine with one
of the above specified categories.

Scott Gray :)

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: