Commit Graph

283 Commits

Author SHA1 Message Date
simokawa
c76c089dc2 Clear PCIM_CMD_SERRESPEN and PCIM_CMD_PERRESPEN for broken hardware.
Some amd64 laptops fail to boot with these flags.

PR: kern/75482
2005-01-06 07:40:34 +00:00
imp
4b319958e7 Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
jmg
04f96285f7 return after freeing data element, instead of falling through, and using
the free'd element, and ultimate NULL deref of the failed allocation.

MFC after:	1 week
2005-01-04 18:15:27 +00:00
simokawa
36690451fe Fix malloc type in free(). 2004-11-10 06:21:47 +00:00
simokawa
d731e713ca Respect _BOOT flag. 2004-10-22 15:39:39 +00:00
simokawa
ba7370a4c3 Add a missing splx(). 2004-09-06 20:42:34 +00:00
simokawa
e39d364e96 Remove an unused variable. 2004-08-29 13:45:55 +00:00
rwatson
c96f7a660e Assert Giant in fwe_start(), as it is not yet MPSAFE. 2004-08-18 04:54:54 +00:00
rwatson
b702c717f3 Since if_fwip doesn't contain locking or run with INTR_MPSAFE, mark
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.

Approved by:	dfr
2004-08-13 23:09:41 +00:00
rwatson
0d13c1f3d6 Set IFF_NEEDSGIANT for fwe network interface since the firewire
framework isn't yet MPSAFE.

Approved by:	simokawa
2004-08-12 03:02:16 +00:00
simokawa
40e1004c57 Fix and add deivce ID's.
Obtained from: DragonFly BSD
2004-08-04 12:18:39 +00:00
kan
4caefcbb3e Avoid casts as lvalues. 2004-07-28 06:21:53 +00:00
dfr
b303cee224 Temporary fix for interoperability with Windows and OS X. A more complete
fix will follow when its ready.

Submitted by: simokawa
2004-07-20 08:58:27 +00:00
simokawa
a9a75e4e9e Don't output too many debug messages for bootverbose.
This driver seems to be fairly stable now.
2004-07-20 04:49:44 +00:00
simokawa
25877174f8 Initialize ifp->if_output for FreeBSD-4. 2004-07-20 04:29:33 +00:00
simokawa
b5eb40de5b Adjust packet length correctly for FreeBSD-4.
Submitted by: Joerg Sonnenberger <joerg@britannica.bec.de>
2004-07-20 03:56:23 +00:00
simokawa
5cc76fae95 Add some PCI IDs for OHCI chips.
Obtained from: DragonFly BSD
2004-07-17 09:41:20 +00:00
phk
5c95d686a1 Do a pass over all modules in the kernel and make them return EOPNOTSUPP
for unknown events.

A number of modules return EINVAL in this instance, and I have left
those alone for now and instead taught MOD_QUIESCE to accept this
as "didn't do anything".
2004-07-15 08:26:07 +00:00
jhb
900e7c295d Trim a few things from the dmesg output and stick them under bootverbose to
cut down on the clutter including PCI interrupt routing, MTRR, pcibios,
etc.

Discussed with:	USENIX Cabal
2004-07-01 07:46:29 +00:00
imp
61364cc869 Remove the setting of the pci config variables on power state changes.
The bus does this now.
2004-06-28 20:26:21 +00:00
simokawa
94bdc181d7 Fix the description of hw.firewire.sbp.exclusive_login.
Submitted by: KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
2004-06-18 08:02:49 +00:00
phk
40dd98a3bd Second half of the dev_t cleanup.
The big lines are:
	NODEV -> NULL
	NOUDEV -> NODEV
	udev_t -> dev_t
	udev2dev() -> findcdev()

Various minor adjustments including handling of userland access to kernel
space struct cdev etc.
2004-06-17 17:16:53 +00:00
phk
dfd1f7fd50 Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
2004-06-16 09:47:26 +00:00
dfr
95f803fb72 Fix spelling. 2004-06-15 16:03:49 +00:00
dfr
c8eeaa3f96 If we run out of transmission labels, just re-queue the packet for later
instead of printing endless error messages on the console and discarding
the packet.
2004-06-14 09:34:20 +00:00
dfr
4707be9db2 Add configuration rom entries for IP over firewire. 2004-06-13 13:58:00 +00:00
dfr
a1fa8042f5 Add a new driver to support IP over firewire. This driver is intended to
conform to the rfc2734 and rfc3146 standard for IP over firewire and
should eventually supercede the fwe driver. Right now the broadcast
channel number is hardwired and we don't support MCAP for multicast
channel allocation - more infrastructure is required in the firewire
code itself to fix these problems.
2004-06-13 10:54:36 +00:00
phk
9d102d7d5a Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
dfr
0c8f1780d6 Don't try to copy out the result payload if there isn't one. This ioctl
interface really needs changing to split out the various async request
types.
2004-05-23 18:43:44 +00:00
mux
03028ee82d We don't need to initialize if_output, ether_ifattach() does it
for us.
2004-05-23 16:11:53 +00:00
dfr
ff01686c8e Initialise OHCI_CROMHDR and OHCI_BUS_OPT in fwohci_ibr to make sure that
they have the right values at the first bus reset.
2004-05-23 14:22:11 +00:00
dfr
721570642d Change u_intXX_t to uintXX_t. Change a couple of 'unsigned long's to
uint32_t where appropriate.
2004-05-22 16:14:17 +00:00
yar
18d2bdbc67 Mark the capability of this driver to receive VLAN frames >1500 bytes
as initially active in if_capenable since it is always on.

Reviewed by:	simokawa
2004-05-21 17:11:34 +00:00
dfr
9595ccdac2 Fix spelling. 2004-05-21 09:12:07 +00:00
dfr
fc45c8c815 Don't use the node id as an index into the topology map. This breaks
if a node on the bus has more than three ports (like my cheapo six
port hub).
2004-05-16 11:26:39 +00:00
simokawa
3e9f33ddfa MFp4: FireWire
* all
- s/__FUNCTION__/__func__/.
	Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
- Compatibility for RELENG_4 and DragonFly.

* firewire
- Timestamp just before queuing.
- Retry bus probe if it fails.
- Use device_printf() for debug message.
- Invalidiate CROM while update.
- Don't process minimum/invalid CROM.

* sbp
- Add ORB_SHORTAGE flag.
- Add sbp.tags tunable.
- Revive doorbell support. It's not enabled by default.
2004-03-26 23:17:10 +00:00
simokawa
f101e77ea9 Fix a bug introduced in rev 1.33(mega API change).
Because xfer->send.payload is a pointer to the buffer, '&' shouldn't be there.

Submitted by: John Weisgerber <weisgerberj@gsilumonics.com>
PR: misc/64623
2004-03-24 01:29:08 +00:00
njl
05a1f56fc9 Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by:	Mark Santcroos <marks@ripe.net>
Reviewed by:	imp, dfr, bde
2004-03-17 17:50:55 +00:00
cperciva
f8fa6977f5 Check that xfer != NULL before dereferencing it, not after.
Reported by:	"Ted Unangst" <tedu@coverity.com>
Approved by:	rwatson (mentor)
2004-02-22 01:10:11 +00:00
phk
ad925439e0 Device megapatch 4/6:
Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.

Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
2004-02-21 21:10:55 +00:00
phk
df397dedea Device megapatch 1/6:
Free approx 86 major numbers with a mostly automatically generated patch.

A number of strategic drivers have been left behind by caution, and a few
because they still (ab)use their major number.
2004-02-21 19:42:58 +00:00
jhb
01083c2eb8 Use the PCIR_BAR() macro rather than a magic number to specify the BAR
for controller memory.
2004-02-12 20:47:03 +00:00
simokawa
d7d8341eff Add NEC uPD72873.
Submitted by: Christian Laursen <xi@borderworlds.dk>
2004-01-30 14:30:19 +00:00
simokawa
afad89848f Use device_identify and bus_add_child methods to add a firewire
bus on fwohci. This should fix attach failure caused by a race
between firewire and fwochi initialization for the kernel module.
2004-01-30 14:28:11 +00:00
simokawa
21c2acb52a * fwohci_pci.c
Improve error message for attach failure.

* sbp_targ.c
	- Add speed in struct sbp_targ_login.
	- Remove unnecessary htonl().
2004-01-23 17:37:09 +00:00
simokawa
9e559fd52a Add missing free() in exception handlers.
Reported by:    Stanford Metacompilation research group
2004-01-22 14:41:17 +00:00
simokawa
4804085c6b Sync type of linkspeed with firewire.c. 2004-01-11 15:40:42 +00:00
simokawa
c71c484186 * firewire
Add tcode_str[] and improve debug message.
* sbp
	If max_speed is negative, use the maximum speed which the
	ohci chip supports.  The default max_speed is -1.
* if_fwe
	If tx_speed is negative, use the maximum speed which the
	ohci chip supports.  The default tx_speed is 2.
2004-01-08 14:58:09 +00:00
simokawa
f366a8ee60 Remove __P(). 2004-01-06 14:30:47 +00:00
simokawa
0a316f051e Fix register mis-alignment introduced in rev1.12. 2004-01-06 14:24:01 +00:00