Use default geometry in case the device doesn't provide one:
512 for sectorsize.
63 for sectors.
255 for heads.
This will mostly show up on MD(4) devices.
Matthew N. Dodd [Sat, 29 Mar 2003 21:44:46 +0000 (21:44 +0000)]
- Return error status instead of value in get_e().
- Modify ep_get_macaddr() to return an error status.
- Reverse the return value logic of eeprom_rdy().
Mike Silbersack [Sat, 29 Mar 2003 21:27:07 +0000 (21:27 +0000)]
Update if_dc to use m_defrag, removing the semi-duplicate dc_coal
function.
Also, use m_defrag where appropriate to defrag long mbuf chains
in the same fashion as was done in if_sis.c. Before this change,
if_dc would blow up and take down the interface if fed a really long
mbuf chain.
Andrew Gallatin [Sat, 29 Mar 2003 18:22:29 +0000 (18:22 +0000)]
Fix the osf1 abi module on SMP systems by making the size of
a struct pmap be the same on both SMP and UP kernels.
It turns out that the size of a struct pmap is much larger on alpha
SMP systems due to the number of pm_asn's being dependant on MAX_CPU.
Since modules are supposed to be SMP agnostic, this has the affect of
moving around the "interesting bits" of the vmspace (daddr, dsize)
that the osf1 module wants to frob. So the module ends up scribbling in a
pmap struct, and the user either sees a panic, or an application failure.
While here, I've also shrunk MAXCPU to 8 now that it affects the size
of pmap structs on UP systesm. This should be plenty, as I'm
unware of any hardware we currently run in which supports more than 8
CPUs.
Søren Schmidt [Sat, 29 Mar 2003 13:37:09 +0000 (13:37 +0000)]
Second round of updates to the ATA driver.
Clean up the DMA interface too much unneeded stuff crept in with
the busdma code back when.
Modify the ATA_IN* / ATA_OUT* macros so that resource and offset
are gotten from a table. That allows for new chipsets that doesn't
nessesarily have things ordered the good old way. This also removes
the need for the wierd PC98 resource functions.
Matthew N. Dodd [Sat, 29 Mar 2003 13:36:41 +0000 (13:36 +0000)]
- Move driver to newbus.
- Provide identify methods for EtherExpress and 3c507 cards; this
means these cards no longer need wired configs.
- Provide a detach method.
Matthew N. Dodd [Sat, 29 Mar 2003 12:42:01 +0000 (12:42 +0000)]
Clear the IFF_OACTIVE flag at the end of ieinit(). This prevents
the adapter from becoming wedged when when the interface is
is brought up by ether_ioctl() (when you set an IP address for example.)
Confirmed this "fix" from NetBSD's i82586 backend. It seems hackish
to me but whatever.
Mike Makonnen [Sat, 29 Mar 2003 11:55:37 +0000 (11:55 +0000)]
Fill in the rest of the fields in the resulting struct tm
from strptime(3). Previously, they would get filled only
for the %s specifier and as a side effect of using the
the %Z specifier with a GMT time zone.
PR: misc/48993
Approved by: markm (mentor)
Silence on: -standards
Matthew N. Dodd [Sat, 29 Mar 2003 08:30:45 +0000 (08:30 +0000)]
- Track resources in our softc.
- Sanitize dpt_alloc().
- Add helper functions for resource alloc/release.
- Add detach method.
- Relocate definition of devclass_t.
- Move some debugging output behind bootverbose.
- Implement an identify method for ISA devices
but don't use it right now.
Mike Silbersack [Sat, 29 Mar 2003 06:34:25 +0000 (06:34 +0000)]
Fix up the long mbuf chain recovery code to use m_defrag; the old
code messed up on B & C chipsets because it lost the packet header
and therefore the flag indicating the need for hardware checksums.
Alan Cox [Sat, 29 Mar 2003 06:14:14 +0000 (06:14 +0000)]
Pass the vm_page's address to sf_buf_alloc(); map the vm_page as part
of sf_buf_alloc() instead of expecting sf_buf_alloc()'s caller to map it.
The ultimate reason for this change is to enable two optimizations:
(1) that there never be more than one sf_buf mapping a vm_page at a time
and (2) 64-bit architectures can transparently use their 1-1 virtual
to physical mapping (e.g., "K0SEG") avoiding the overhead of pmap_qenter()
and pmap_qremove().
Mike Silbersack [Sat, 29 Mar 2003 05:48:36 +0000 (05:48 +0000)]
Add the m_defrag routine, as discussed on committers@. This
incarnation should address the concerns of all in the discussion,
and keeps statistics which show how much it is used.
Warner Losh [Fri, 28 Mar 2003 07:14:12 +0000 (07:14 +0000)]
Remove bogus card.4, and replace it with a link to oldcard.4. ru
pointed this out a while ago, and I'm just now getting back to it. It
obsoletes one of ru's changes, but since oldcard.4 is so much better,
that doesn't matter.
Warner Losh [Fri, 28 Mar 2003 07:09:17 +0000 (07:09 +0000)]
Create a man page for bus_child_present(9), a function to see if a
given device is considered accessible by its parent device bus driver
(or its parent, etc).
Matthew N. Dodd [Fri, 28 Mar 2003 06:27:08 +0000 (06:27 +0000)]
- Clean up function calling conventions.
- Be consistent about what we call our softc.
- Minor formatting.
- Add some register definitions gleaned from NetBSD/Linux.
Ian Dowse [Fri, 28 Mar 2003 02:50:10 +0000 (02:50 +0000)]
Add a checksum to the kernel message buffer, and update it every
time a character is written. Use this at boot time to reject the
existing buffer contents if they are corrupt. This fixes a problem
seen on some hardware (especially laptops) where the message buffer
gets partially corrupted during a short power cycle or reset, but
the msgbuf structure is left intact so it gets reused, resulting
in random junk and control characters appearing in dmesg and
/var/log/messages.
Juli Mallett [Fri, 28 Mar 2003 01:50:11 +0000 (01:50 +0000)]
Close the disk file descriptor that is RO before trying to open the
new one, and do not fall back to the RO fd. There was a bug here
in that the RO fd was never closed, if the RDRW open succeeded, but
this code is bogus anyway, and it breaks newfs of floppies, at least
for me, due to "Device busy." Anything that wants to fall back is
doing something significantly odd that it should have some more complex
code on its end.
Robert Watson [Thu, 27 Mar 2003 20:44:09 +0000 (20:44 +0000)]
Don't pass NULL in as a flags argument to libfetch's fetchGetURL()
as this can result in a NULL pointer deference when parsing the
flags later. This change fixes "pkg_add -r" on 5.0-CURRENT for
me; not quite clear how the problem was introduced.
Matthew N. Dodd [Thu, 27 Mar 2003 20:38:00 +0000 (20:38 +0000)]
- Rely on ether_ifattach() to initialize part of our struct ifnet
rather than doing it ourself.
- Set ifq_maxlen.
- Include the size of the ethernet header when we allocate
our mbuf chain in ieget().
Robert Watson [Thu, 27 Mar 2003 19:26:39 +0000 (19:26 +0000)]
Trim "trustedbsd_" from the front of the policy module "short names";
the vendor is only included in the long name currently, reducing
verbosity when modules are registered and unregistered.