2002-11-25 13:34:52

by Mathiasen, Torben

[permalink] [raw]
Subject: [PATCH-2.5.47-ac6] More IDE updates (BIOS, simplex, etc)

Hi Alan,

Please apply the attached patch. Its an update on my previos patch with a
rewrite of the simplex code. The patch now does the following:

# Make simplex detection on a per drive basis and dynamic for use
with hotplug.
# Make sure we also enforce simplex rules when using hdparm.
# Make sure we also enforce simplex rules when using BIOS timings.
# Moves BIOS timings IDE detection into chipset drivers (by providing a
library function).
# Provide the above library function that sets default values for tune
parameters. It also handles the special case where user has requested
to use BIOS IDE timings. Caller is assumed to support DMA
on/off probe using the dma_status register unless a dma_check funtion
is provided (note, the tekram driver is somewhat different from all
the others, and haven't been updated yet).
# Makes BIOS IDE timings work for both IDE0 and IDE1 at the same time.

I'm not sure whether you already applied my previous patch, so let me know if
you want this on top of that one.

Cheers,
Torben


Attachments:
(No filename) (1.03 kB)
ide_bios-2.5.47-ac6-4.diff (27.28 kB)
Download all attachments

2002-11-26 06:01:29

by Andre Hedrick

[permalink] [raw]
Subject: Re: [PATCH-2.5.47-ac6] More IDE updates (BIOS, simplex, etc)


I love it! I finally got the inital model correct and with the aid and
trust of Alan to bring me back in the loop, everyone is doing great stuff.

Is there an interest in closing out the taskfile io model to complete the
transformation? If so the following has to be added, and effects PIO
only.

Given the new BIO has the ablitity to force and match BIO atomic segments
with Disk Data Block (atomic segment) it make it much nicer!

The interrupt race or lost interrupts happens for the following reason and
only this reason:

interrupt_servicing:
check_status:
map_hi_bios:
output_ata_data_register:
competiton (here begins the race!)
interrupt: (this can happen almost instantly)
unmap_hi_bios:
update_partial_completion_of_original_larger:
return_if_last_data_block_was_transfered_request_complete:
arm_isr:
jump_to_interrupt:


The completion of the local atomic segement of data can cause the device
to pop an interrupt instant, and there is no handler armed to catch it.

interrupt_servicing:
check_status:
arm_isr:
boost_wait_time_worst_case_to_prevent_early_timer_popping:
map_hi_bios:
output_ata_data_register:
competiton (here begins the race!)
interrupt: (this can happen almost instantly)
who_cares_but_needs_a_sem_to_block:
unmap_hi_bios:
update_partial_completion_of_original_larger:
if_last_data_block_dissarm_handler:
return_if_last_data_block_was_transfered_request_complete:


Comments?


Andre Hedrick
LAD Storage Consulting Group

On Mon, 25 Nov 2002, Torben Mathiasen wrote:

> Hi Alan,
>
> Please apply the attached patch. Its an update on my previos patch with a
> rewrite of the simplex code. The patch now does the following:
>
> # Make simplex detection on a per drive basis and dynamic for use
> with hotplug.
> # Make sure we also enforce simplex rules when using hdparm.
> # Make sure we also enforce simplex rules when using BIOS timings.
> # Moves BIOS timings IDE detection into chipset drivers (by providing a
> library function).
> # Provide the above library function that sets default values for tune
> parameters. It also handles the special case where user has requested
> to use BIOS IDE timings. Caller is assumed to support DMA
> on/off probe using the dma_status register unless a dma_check funtion
> is provided (note, the tekram driver is somewhat different from all
> the others, and haven't been updated yet).
> # Makes BIOS IDE timings work for both IDE0 and IDE1 at the same time.
>
> I'm not sure whether you already applied my previous patch, so let me know if
> you want this on top of that one.
>
> Cheers,
> Torben
>

2002-11-27 12:48:06

by Mathiasen, Torben

[permalink] [raw]
Subject: Re: [PATCH-2.5.47-ac6] More IDE updates (BIOS, simplex, etc)

Alan mentioned some missing locking in the IDE code, I assume thats what this
is about, or does it only affect the taskfile stuff?

I started to write a driver for the Compaq triflex stuff that Alan requested,
hopefully something should come out next week.

Also, with regards to our recent talk on how windows was doing DMA handling,
the link below was brought to my attention. Disabling DMA on cd-rom driver per
default seems somewhat overkill to me.

http://www.microsoft.com/hwdev/tech/storage/IDE-DMA.asp

Cheers,
Torben

On Mon, Nov 25 2002, Andre Hedrick wrote:
>
> I love it! I finally got the inital model correct and with the aid and
> trust of Alan to bring me back in the loop, everyone is doing great stuff.
>
> Is there an interest in closing out the taskfile io model to complete the
> transformation? If so the following has to be added, and effects PIO
> only.
>
> Given the new BIO has the ablitity to force and match BIO atomic segments
> with Disk Data Block (atomic segment) it make it much nicer!
>
> The interrupt race or lost interrupts happens for the following reason and
> only this reason:
>
> interrupt_servicing:
> check_status:
> map_hi_bios:
> output_ata_data_register:
> competiton (here begins the race!)
> interrupt: (this can happen almost instantly)
> unmap_hi_bios:
> update_partial_completion_of_original_larger:
> return_if_last_data_block_was_transfered_request_complete:
> arm_isr:
> jump_to_interrupt:
>
>
> The completion of the local atomic segement of data can cause the device
> to pop an interrupt instant, and there is no handler armed to catch it.
>
> interrupt_servicing:
> check_status:
> arm_isr:
> boost_wait_time_worst_case_to_prevent_early_timer_popping:
> map_hi_bios:
> output_ata_data_register:
> competiton (here begins the race!)
> interrupt: (this can happen almost instantly)
> who_cares_but_needs_a_sem_to_block:
> unmap_hi_bios:
> update_partial_completion_of_original_larger:
> if_last_data_block_dissarm_handler:
> return_if_last_data_block_was_transfered_request_complete:
>
>
> Comments?
>
>
> Andre Hedrick
> LAD Storage Consulting Group
>
> On Mon, 25 Nov 2002, Torben Mathiasen wrote:
>
> > Hi Alan,
> >
> > Please apply the attached patch. Its an update on my previos patch with a
> > rewrite of the simplex code. The patch now does the following:
> >
> > # Make simplex detection on a per drive basis and dynamic for use
> > with hotplug.
> > # Make sure we also enforce simplex rules when using hdparm.
> > # Make sure we also enforce simplex rules when using BIOS timings.
> > # Moves BIOS timings IDE detection into chipset drivers (by providing a
> > library function).
> > # Provide the above library function that sets default values for tune
> > parameters. It also handles the special case where user has requested
> > to use BIOS IDE timings. Caller is assumed to support DMA
> > on/off probe using the dma_status register unless a dma_check funtion
> > is provided (note, the tekram driver is somewhat different from all
> > the others, and haven't been updated yet).
> > # Makes BIOS IDE timings work for both IDE0 and IDE1 at the same time.
> >
> > I'm not sure whether you already applied my previous patch, so let me know if
> > you want this on top of that one.
> >
> > Cheers,
> > Torben
> >

2002-11-27 13:16:26

by Alan

[permalink] [raw]
Subject: Re: [PATCH-2.5.47-ac6] More IDE updates (BIOS, simplex, etc)

On Wed, 2002-11-27 at 12:55, Torben Mathiasen wrote:
> Alan mentioned some missing locking in the IDE code, I assume thats what this
> is about, or does it only affect the taskfile stuff?

The locking is general stuff - eg write to a proc entry as the device is
switched from ide-cd to ide-scsi. Switch a device to ide-scsi as you
remove it - and so on