questions about the ide driver

Richard Gray (sgray@preferred.com)
Mon, 06 Oct 1997 00:17:25 -0400


Hi

I'm working on some diagrams in an attempt to help me to understand how

the ide device driver works. Below is a geneal outline that shows how I
pan
to organize this diagram. I would be very 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 some will be able to look at this and give me some
feedback.
I'm trying to work on a school project which involves adaptive block
rearrangement. The problem is that I've never had any exposure to
systems
programming. I think if I could consturct an outline like above "except
this
one needs to be correct" this would help me tremendously. As I go
thought
ide.c, I can associated each routine with one of the above categories.

Thanks,
Scott Gray