Commit Graph

10424 Commits

Author SHA1 Message Date
imp
804e92af91 Don't establish the ISR in the sn_activate routine. I've had two
crashes that had sn0 as the irq that's being serviced, when there was
no sn0 in the system.  This seems to prevent them.  Also, we want to
wait until after we've registered with the network layer before we
turn on the interrupt spigot to avoid races.
2003-11-10 16:04:11 +00:00
simokawa
88eb0432d9 Reduce debug message. 2003-11-10 14:04:37 +00:00
simokawa
d78e17d18b * Improve sbp device probe in boot process.
- Notify BUS RESET to CAM in sbp_attach().
	- Use last bus reset time to determine login delay.

Tested by: imura

* Add some sysctl MIB and tunables.
2003-11-10 03:51:23 +00:00
imp
0139b2158b Move 'guessing' code from the probe into the identify routine where it more
properly belongs.
2003-11-10 02:47:11 +00:00
joe
f6f94ac7fc MFNetBSD:
date: 2003/10/18 04:50:35;  author: simonb
    Remove assigned-to but otherwise unused variables.
    Remove unreachable break after return statements.
2003-11-10 00:20:52 +00:00
joe
28ba6b05d3 MFNetBSD:
revision 1.142
    date: 2003/10/11 03:04:26;  author: toshii
    Fix a done list handling bug which exhibits under high shared
    interrupt rate and bus traffic.  As the interrupt register is
    read after checking hcca_done_head, there was a small chance
    of dropping a done list.  Ignore OHCI_WDH interrupt bit if
    hcca_done_head is zero so that OHCI_WDH is processed later.
2003-11-10 00:16:36 +00:00
joe
9313579fa7 MFNetBSD:
revision 1.141
    date: 2003/09/10 20:08:29;  author: mycroft;
    Update actlen even in the case where a TD returns an error --
    this is critical for the umass bulk-only STALL case.
2003-11-10 00:12:39 +00:00
joe
e5da636735 MFNetBSD:
revision 1.176
    date: 2003/11/04 19:11:21;  author: mycroft;
    Ignore a CRCTO error on a SETUP transaction in combination with
    STALLED or NAK.  This fixes problems with the GL641.
2003-11-10 00:08:41 +00:00
joe
6b8c93a1ab MFNetBSD:
date: 2003/09/12 16:18:08;  author: mycroft;
    Tweak a debugging printf().
2003-11-09 23:59:53 +00:00
joe
d29dc15237 Revise the NetBSD revision control strings. 2003-11-09 23:56:19 +00:00
joe
59ab76006a MFNetBSD:
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
  this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
2003-11-09 23:54:21 +00:00
scottl
b5775784dd Free the ata_request struct after we are done using it. This should stop
the memory leak seen when using ATAPICAM.
2003-11-09 20:46:08 +00:00
imp
87bc402cf2 Tweak the front end driver file list
Also some minor whitespace nits.
2003-11-09 20:02:47 +00:00
imp
4e71bf2bbd Add my copyright to aha_isa.c to make it crystal clear its license 2003-11-09 20:01:36 +00:00
imp
e060a36d77 Let bus space manage softc. 2003-11-09 19:51:16 +00:00
imp
9189a12295 Minor tweaks to make it behave better:
o When we're resetting the board, make sure that we error out the pending
  CCBs first.  Otherwise the aha_cmd won't accept further commands, such
  as those that are used to reset the card (AOP_INITIALIZE_MBOX).  This
  appears to cause a cascade failure where no more commands are possible
  to the card.
o Reduce from 10s down to 1s the amount of time we're willing to tolerate
  the card being awol.  This helps the above case.
o Add some error checking to two commands issued in the probe.

I have a dim memory of gibbs@ trying to tell me about this problem a
few years ago, so pointy hat to imp@ for sitting on it so long.
2003-11-09 17:16:39 +00:00
imp
1480b8c587 Minor comment smithing 2003-11-09 17:05:55 +00:00
sos
1528f8f6b7 Fix typo in breaking up requests to size limit.
Found by: Peter Edwards <pmedwards@eircom.net>
2003-11-09 10:11:15 +00:00
tanimura
7eade05dfa - Implement selwakeuppri() which allows raising the priority of a
thread being waken up.  The thread waken up can run at a priority as
  high as after tsleep().

- Replace selwakeup()s with selwakeuppri()s and pass appropriate
  priorities.

- Add cv_broadcastpri() which raises the priority of the broadcast
  threads.  Used by selwakeuppri() if collision occurs.

Not objected in:	-arch, -current
2003-11-09 09:17:26 +00:00
imp
2d5987075a Make this driver a little more style(9) compliant 2003-11-09 00:51:52 +00:00
sam
7f3b205cb8 o add a flags parameter to netisr_register that is used to specify
whether or not the isr needs to hold Giant when running; Giant-less
  operation is also controlled by the setting of debug_mpsafenet
o mark all netisr's except NETISR_IP as needing Giant
o add a GIANT_REQUIRED assertion to the top of netisr's that need Giant
o pickup Giant (when debug_mpsafenet is 1) inside ip_input before
  calling up with a packet
o change netisr handling so swi_net runs w/o Giant; instead we grab
  Giant before invoking handlers based on whether the handler needs Giant
o change netisr handling so that netisr's that are marked MPSAFE may
  have multiple instances active at a time
o add netisr statistics for packets dropped because the isr is inactive

Supported by:	FreeBSD Foundation
2003-11-08 22:28:40 +00:00
simokawa
3357535415 Move post dmamap_load processes into the callback function. 2003-11-08 16:26:22 +00:00
joe
e1f9924e1b I've had a couple of reports that the Sony Clie_40 doesn't need the
PALM_4 initialisation hack.  I've not confirmed it myself, but
seeing as we already don't use it for the Sony Clie_41, let's drop
it from the Clie_40 also and see what happens.

(Question: What about the Clie_S360 and Clie_NX60 devices?  Do we
 need to drop Palm4 from those as well?  Possibly, but I've not had
 any reports about those so I don't know.)

PR:		kern/56575
MFC after:	3 days
2003-11-08 11:23:07 +00:00
sos
2b6b524b73 Remove the NOGIANT flag again, it was premature. 2003-11-08 09:56:34 +00:00
imp
062002500c -Wunused 2003-11-08 03:28:43 +00:00
imp
ae477bf060 Remove channeling interrupts to IRQ1. Some chipsets don't do the
expected thing and that causes interference with keyboards.
2003-11-07 23:12:59 +00:00
peter
1c0b81ebd5 Ahh, the joys of badge engineering. Tell the sk driver that the
Linksys EG1032 is yet another variation.  It looks just like the 3c940
except it only has a Marvell logo and no 3com logo.
2003-11-07 22:04:26 +00:00
simokawa
78a182b242 Allow shared open of /dev/fwmem* for read-only. 2003-11-07 12:39:39 +00:00
simokawa
8c5c585444 Respect a return code of fwmem_open(). 2003-11-07 12:30:57 +00:00
simokawa
3fbf59c91d Increase FWMAXQUEUE up to 128. 2003-11-07 09:01:41 +00:00
simokawa
377c274717 Add compatibility for 4-stable.
Submitted by: imura
2003-11-07 08:59:35 +00:00
sos
4c2de3d46a Better attempt at fooling GEOM into working with burnable media. 2003-11-07 08:31:09 +00:00
ps
1fb226c0ca Add PCID for 6i controller
Submitted by:	John Cagle <john.cagle@hp.com>
2003-11-07 03:01:48 +00:00
rsm
07495c5a82 Disable the (currently unused) xe_reg_dump() function, until I know for
sure that it's not needed any more.

Reviewed by:	imp (mentor)
2003-11-06 08:54:43 +00:00
ps
f6878e1535 Correct the structure packing.
Reported by:	Vinod Kashyap <vkashyap@3WARE.com>
2003-11-06 08:09:29 +00:00
simokawa
96ae8eeca7 Use if_printf() for FWEDEBUG. 2003-11-06 04:19:15 +00:00
sos
d7dd8dce01 Pull ataraid out from under giant.
Use the right bio_* fields for internal stuff.
2003-11-05 15:41:20 +00:00
harti
13097932fd Make the driver conditionally MPSAFE. MPSAFEty defaults to not-mpsafe
but can be enabled by setting hw.atm.hatmN.mpsafe in the kernel
environment to a non-zero value before loading the driver. When
the problems with network MPSAFEty have been sorted out this will
be removed and the driver will default to MPSAFE.
2003-11-05 11:47:31 +00:00
harti
dcdf96e89d When compiled with debugging trace the number of transmit mbufs that
we own. Warn if something strange happens (number drops below zero or
there appears to be a leak).
2003-11-05 11:43:06 +00:00
harti
18063d10db Initialize the USED flag in new external receive buffers to 0, not to 1.
We put them directly onto the free list instead of calling the
external mbuf free routine (that routine would have cleaned the flag).

This fixes a bug which manifests itself in falsely reporting a lot of used
buffers when configuring the interface down.
2003-11-05 11:15:47 +00:00
imp
0206145b43 Make xe_reg_dump non-static to avoid warnings (and tinerbox mail)
for now.
2003-11-05 08:27:13 +00:00
green
039b0cb0da Truly fix the lockup mentioned in 1.153. The PRISM hardware is not
capable of functioning in HostAP mode with a zero-length SSID, so
use " " if one is not set.
2003-11-04 23:47:19 +00:00
green
2f6cf5f97e Despite making the card not lock up, thae workaround from 1.153 didn't
actually make hostap mode work again.  Back it out while I try to find
a solution.
2003-11-04 22:36:48 +00:00
rsm
97d0304090 Convert XE_DEBUG define to hw.xe.debug sysctl, to set debug logging level
from the xe driver.  Should probably be removed when current probe/attach
problems with the driver are fixed, but is useful now when requesting
diagnostic information from users.

Reviewed by:	imp (mentor)
2003-11-04 21:09:37 +00:00
imp
954c37da29 Use %#jx for both args.
Non-use of %# mocked by: bde
2003-11-04 06:30:59 +00:00
imp
d8b13dab5a o Add sysctl to allow ignoring checksum of eeprom.
o Fix minor type problems
o Fix minor problem with a couple debug printfs.
o Default to a sane media type when none is reported.
o Minor style changes

The PR complains this will fix the IBM 300GL cards.

Submitted by: Max Gotlib
PR: 11462
2003-11-04 02:59:57 +00:00
green
482fc15052 Fix wi(4)'s WI_RID_SCAN_RES ioctl (wicontrol -L). The wrong length
is computed, so the user thinks that for non-PRISM cards there are
more APs represented than exist.
2003-11-04 00:31:58 +00:00
green
6f7aa7fb6c On my ZoomAir-branded Intersil PRISM2 cards, if you try to set the
operating mode to HostAP, the card will lock up indefinitely (but
the wi(4) driver can recover if you eject the card).  The problem is
that the card needs to be "reset" in a way before you even change the
media to hostap.  In practice this isn't as noticeable because you
probably do some operation beforehand which prevents the lock-up
before you enable hostap mode.

e.g.:
"ifconfig wi0 up media autoselect mediaopt hostap" will lock up
(if you just inserted the card).
"ifconfig wi0 up ssid foo media autoselect mediaopt hostap" won't lock up.
2003-11-04 00:24:13 +00:00
jhb
2e2d133543 Enable PCI interrupt routing for i386 SMP kernels. 2003-11-03 22:06:35 +00:00
imp
ba259e8c51 Fix two small style nits pointed out by bde: Remove spaces after cast and
indent continued line 4 spaces instead of 2.
2003-11-03 21:54:24 +00:00