Commit Graph

19 Commits

Author SHA1 Message Date
mycroft 1fd9249360 Attempt to fix sbp2_free() so that it doesn't core dump. As noted in PR 21099,
but fixed differently.
2004-06-29 11:10:29 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
jmc 4829a1952a Redo last fix to work correctly. Need to run abort on each orb (though it
doesn't much now it will eventually) and then so a proper sbp2_free_orb.
2003-03-07 20:18:57 +00:00
drochner c0e23f3152 -Fix ORB queue corruption / use of free()d memory
caused by bad interaction of sbp2_free() and sbp2_abort().
 sbp2_abort() requires that its argument ORB is on the
 "active" list, and it puts it onto the freelist - sometimes.
 So we had 2 causes of corruption:
 -removing the ORB from a list which it isn't on
 -free()ing recycleable items on the ORB freelist
-minor cosmetics
2003-03-07 16:29:33 +00:00
enami fa6061e7a4 Make this file compiles when FW_DEBUG is defined but SBP2_DEBUG isn't defined. 2003-02-28 23:31:41 +00:00
thorpej a5fa1cfd6a Use PRIx64 to get the correct format for 64-bit hex numbers. Don't
need \n at the end of a panic().
2003-01-09 19:16:30 +00:00
jmc 549904564e Implementation of page table support for 64k or greater transfers. This should
also handle uio structs passed in as well. All standard filesystem actions
are working at this stage (can copy, execute, mount, umount, fsck, etc).
2002-12-28 10:54:47 +00:00
jmc fe19747374 Redo state handling as ack's, status, etc can come in and be processed in
various orders depending how the upper level driver is flushing it's queue's.
This prevents the deadlocks I was seeing before with >8k writes.

XXX: Still not completely there as > 64k copies trigger bugs and the page
table support still needs to be written to break those down.
2002-12-18 04:48:33 +00:00
jmc e627b7fefc Improve performance with disks almost 60x by redoing the callback handler to
accept ranges as well as single addresses. Still need to go through any key
areas and remove the malloc's and replace these with some sort of pooling
instead.
2002-12-13 07:47:52 +00:00
jmc 0215635717 Checkpoint commit:
1. Reduce debugging level to sane levels
2. Fix bugs in alloc_data_map related to allocing whole bytes of bitmap at
a time.

At this point the driver is functional. It talks to a local drive here and
can label/newfs. Performance is...lacking at the moment as its chewing cpu
heavily (probably due to the number of memcpy's) and will be the next area
attacked.
2002-12-09 23:42:53 +00:00
jmc 3d5ded55c7 Write sbp2_free_data_mapping and fix a bug where read responses weren't sending
back the right tlabel
2002-12-09 07:23:43 +00:00
jmc 9bea8ca9b7 Fix logic screwup in determining which bits to set in alloc'ing data maps 2002-12-08 05:59:05 +00:00
jmc 5a69251dd8 Account for corner cases better in alloc_data_mapping and only ask for a 16s
reconnect time instead of 2^16s
2002-12-06 02:19:34 +00:00
explorer 4c21f28434 make this compile without SBP2_DEBUG defined 2002-12-03 06:11:31 +00:00
jmc 4e448779d8 Checkpoint checkin:
1. Clean up some debugging and trigger some on only extreme debugging needs
2. Comment alloc data mapping a bit better and fix some of the bugs here
(note..there still are some so for now the free method is never called while
I track these down)
3. Fix the copying logic in data_resp. It was calculating negative offsets
which blew up memcpy.

At this point I can probe, inquire and get through the findroot steps of a
boot:

sd0 at scsibus0 target 0 lun 0: <Maxtor, 1394 storage, 60> disk fixed
sd0: mode sense (4) returned nonsense; using fictitious geometry
sd0: 76293 MB, 76293 cyl, 64 head, 32 sec, 512 bytes/sect x 156250000 sectors
sd0: mode sense (4) returned nonsense; using fictitious geometry
sd0: no disk label
findroot: can't open dev sd0a (6)

NOTE: This will panic my machine right now with a simple disklabel -r sd0.
Also, since the free mappings routines are if (0)'d out at the moment do not
use this code for anything except experiments and then only on a machine
you don't mind panic'ing.

Fixing the mapping routines will be the next step and then finally chasing
down the proper mode sense these drives understand.
2002-12-01 12:09:56 +00:00
jmc 1f366747d4 Tidy up some debug routines and make verbose packet dumps only when sbp2debug>2 2002-11-30 06:18:54 +00:00
jmc 1db8069fe5 First pass (checkpoint checkin) for firewire scsi code.
There are a number of issues here for anyone trying to use this today:

1. On my test drive the command engine on the drive seems to stall after the
   inquire is done. So the mode sense times out for a long time before
   aborting. This obviously needs to be tracked down and fixed.

   However it does do a proper inquire:

scsibus0 at sbpscsi0: 1 target, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <Maxtor, 1394 storage, 60> disk fixed

2. This code is quite ugly in places as debug code was added to test things.
   Definitly needs cleanup/documention in places where it's using command
   structures. The structure for alloc'ing orbs, running them through the
   command engine and getting state back is mostly set but implementation needs
   an overhaul in places.

3. For testing I use the following config options:

fwohci* at cardbus? dev ? function ?    # IEEE1394 Controller
fw*     at fwbus?
options FW_DEBUG
options FWNODE_DEBUG
options P1212_DEBUG
options SBP2_DEBUG
options SBPSCSI_DEBUG
fwnode* at fwbus?
sbpscsi* at fwnode?
scsibus* at sbpscsi?
2002-11-22 16:28:54 +00:00
jmc 71b05541b5 Initial layout for SBP2 routines. Mainly just the code yanked from fwnode.c
so it's not lost.
2002-02-27 05:12:11 +00:00