* Clean up the socket state earlier in the attach process -- not relying on
the socket attachment to do it.
* Get rid of PCIC_LASTSTATE_HALF. It's pointless.
* In pcic_wait_ready(), also check for the card vanishing, like in pccbb.
* Assert #RESET before powering up the card, not after. (I think it was
actually okay because the value was left as 0 from a previous disable or
the initial socket attach, but...
* If the card fails to come ready, don't bother reinstating windows or
anything -- just power it down.
reading the FIFO status and reading the interrupt status, we could end up
leaving it in the FIFO. Force another round through the loop after reading the
interrupt status until the FIFO reads empty again.
Also, there is no point in having the extra loop to wait for the transfer
command to the controller to be acknowledged, because the transfer loop handles
that just fine -- and getting rid of it fixes another race condition.
instead have a call down from the PCMCIA mid-layer to set it. Use this from
pcmcia_function_enable(). (Currently the policy is the same, but this would
allow for more flexibility in deciding which mode to use.)
Now it is safe to hold the socket enabled during attach, so do that. Only
one enable/disable cycle to attach a card now!
are at the end of the node queue. Change the reference-counting
discipline: ni->ni_refcnt indicates how many times net80211 has
granted ni to the driver. Every node in the table with ni_refcnt=0
is eligible to be garbage-collected. The mere presence of a node
in the table does not any longer indicate its auth/assoc state;
nodes have a ni_state variable, now. A sysctl,
net.link.ieee80211.maxnodecache, controls the maximum LRU cache
size.
While I am here, patch ieee80211_find_node_for_beacon to do a "best
match" by bssid/ssid/channel, not a "perfect match." This keeps
net80211 from caching duplicate nodes in the table.
* If the device returns a length too short to even contain the RID number,
flag it as not supported and return EOPNOTSUPP, rather than returning a
length of -2 and trying to use the value anyway.
* Check the returned lengths to see if we actually got anything.
* If we get no rate list, fail the attach, so we don't just blow up later.
Allow the frontend to pass in a MAC address.
and kill only pending requests for this drive.
Implement a DRIVE_WAITDRAIN flag, which will cause the active command to
be killed once complete.
Other minor fixes.
Now it's possible to detach a ATA or ATAPI device from ioctl even when
a dd on the raw char partition is running.
struct ata_xfer *active_xfer
to ata_queue. Now the active xfer isn't the head of the queue any more,
this makes a few things easier (this will also help for tagged queuing
support).
Remove the WDCF_ACTIVE flag, test active_xfer != NULL instead.
clean up wdc_free_xfer() and kill_xfer().
Clean up wdc_reset_channel(), and make it issue a ATAPI_SOFT_RESET if the
active command is ATAPI.
In wdc_atapi_get_params(), use AT_WAIT | AT_POLL for ATAPI_SOFT_RESET,
so that we'll use tsleep() instead of delay().
In wdc_atapi_start(), call wdc_dmawait() at the right place.
Use this to reset the channel before doing a dump, instead of the hack in
wdc_exec_xfer() based on C_POLL. This hack was causing problems on
controllers with a shared queue, because we now can have C_POLL set during
concurent channels probes (problem found and analysed on sparc64 by
Martin Husemann).
This should even make core dumps marginally more reliable on ATA drives.