aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/firewire
Commit message (Collapse)AuthorAgeFilesLines
* Reduce debug messages.Hidetoshi Shimokawa2003-10-231-2/+4
| | | | Notes: svn path=/head/; revision=121381
* Add SBP-II target mode driver.Hidetoshi Shimokawa2003-10-181-0/+1550
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Though this is still incomplete and has some missing features such as exclusive login and event notification, it may be enough for someone who wants to play with it. This driver is supposed to work with firewire(4), targ(4) of CAM(4) and scsi_target(8) which can be found in /usr/share/example/scsi_target. This driver doesn't require sbp(4) which implements initiator mode. Sample configuration: Kernel: (you can use modules as well) device firewire device scbus device targ device sbp_targ After reboot: # mdconfig -a -t malloc -s 10m md0 # scsi_target 0:0:0 /dev/md0 (Assuming sbp_targ0 on scbus0) You should find the 10MB HDD on FreeBSD/MacOS X/WinXP or whatever connected to the target using FireWire. Manpage is not finished yet. Notes: svn path=/head/; revision=121186
* - Call sbp_reset_start() for mgm timeout.Hidetoshi Shimokawa2003-10-181-166/+316
| | | | | | | | | | - Change type of target->luns to allocate an array of LUNs dynamically. This allows targets to change their number of LUNs after each bus reset. - Serialize ORB POINTER command for each LUN. - Improve debug messages. Notes: svn path=/head/; revision=121185
* - Introduce hw.firewire.hold_count sysctl MIB by popular demand.Hidetoshi Shimokawa2003-10-061-18/+24
| | | | | | | | | | This MIB specifies how many bus resets should be observed before the lost device entry is removed. The default value is 3. You can set this value to 0 if you want a SBP device to be detached from CAM layer as soon as the device is physically detached like USB. Notes: svn path=/head/; revision=120850
* - Implement sbp_poll() to enable kernel dump on SBP-2 device.Hidetoshi Shimokawa2003-10-061-1/+9
| | | | Notes: svn path=/head/; revision=120847
* - Fix timeout for unodered excution.Hidetoshi Shimokawa2003-10-061-12/+32
| | | | | | | | | | | | | | In unodered excution case, we cannot detect link-chain end only by prev == NULL if lastest ORB is executed earlyer than the former ORBs. Use ORB_LINK_DEAD flag for this case. - Don't reset agent for management ORB. - Improve debug messages. Spotted by: sbp target mode Notes: svn path=/head/; revision=120842
* Remove wrong usage of BUF_REFCNT().Hidetoshi Shimokawa2003-10-021-1/+0
| | | | | | | Spotted by: phk Notes: svn path=/head/; revision=120664
* MFp4: Change struct fw_xfer to reduce memory copy in fwmem_*() functions.Hidetoshi Shimokawa2003-10-0212-656/+803
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And many changes. * all - Major change of struct fw_xfer. o {send,recv}.buf is splitted into hdr and payload. o Remove unnecessary fields. o spd is moved under send and recv. - Remove unnecessary 'volatile' keyword. - Add definition of rtcode and extcode. * firewire.c - Ignore FWDEVINVAL devices in fw_noderesolve_nodeid(). - Check the existance of the bind before call STAILQ_REMOVE(). - Fix bug in the fw_bindadd(). - Change element of struct fw_bind for simplicity. - Check rtcode of response packet. - Reduce split transaction timeout to 200 msec. (100msec is the default value in the spec.) - Set watchdog timer cycle to 10 Hz. - Set xfer->tv just before calling fw_get_tlabel(). * fwohci.c - Simplifies fwohci_get_plen(). * sbp.c - Fix byte order of multibyte scsi_status informations. - Split sbp.c and sbp.h. - Unit number is not necessary for FIFO¤ address. - Reduce LOGIN_DELAY and SCAN_DELAY to 1 sec. - Add some constants defineded in SBP-2 spec. * fwmem.c - Introduce fwmem_strategy() and reduce memory copy. Notes: svn path=/head/; revision=120660
* Fix a bug in fwdev_clone().Hidetoshi Shimokawa2003-10-011-1/+1
| | | | | | | Spotted by: grog Notes: svn path=/head/; revision=120624
* Phy register map.Hidetoshi Shimokawa2003-09-251-0/+168
| | | | Notes: svn path=/head/; revision=120431
* Fix byte order of multi-byte scsi_status information.Hidetoshi Shimokawa2003-08-291-20/+11
| | | | Notes: svn path=/head/; revision=119556
* Use __FBSDID().David E. O'Brien2003-08-243-5/+10
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* Make this compiled on RELENG_4.Hidetoshi Shimokawa2003-08-221-0/+5
| | | | Notes: svn path=/head/; revision=119290
* Comment out verbose debug messages.Hidetoshi Shimokawa2003-08-222-0/+4
| | | | Notes: svn path=/head/; revision=119289
* Prefer new location of pci include files (which have only been in theWarner Losh2003-08-221-2/+2
| | | | | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD. Notes: svn path=/head/; revision=119277
* Include order bit in sdev->type.Hidetoshi Shimokawa2003-08-211-1/+1
| | | | Notes: svn path=/head/; revision=119196
* Fill reserved fields of transmitting packets header with zero.Hidetoshi Shimokawa2003-08-202-14/+24
| | | | | | | | | This fixes the if_fwe problem with 1394b chip. PR and Tested by: nork Notes: svn path=/head/; revision=119155
* Remove unused code.Hidetoshi Shimokawa2003-08-191-2/+0
| | | | Notes: svn path=/head/; revision=119120
* Drop too short packets.Hidetoshi Shimokawa2003-08-191-4/+8
| | | | Notes: svn path=/head/; revision=119119
* Allow to access phy registers via ioctl().Hidetoshi Shimokawa2003-08-192-1/+18
| | | | Notes: svn path=/head/; revision=119118
* Validate number of iso. DMA channels.Hidetoshi Shimokawa2003-08-121-0/+2
| | | | Notes: svn path=/head/; revision=118820
* Change device name notation.Hidetoshi Shimokawa2003-08-054-54/+141
| | | | | | | | | - /dev/fw{,mem}X.Y represents the Y'th unit on the X'th bus. - /dev/fw{,mem}X is an alias of fw{,mem}X.0 for compatibility. - Clone devices. Notes: svn path=/head/; revision=118455
* - Don't mess with TX queue in fwohci_stop() if we failed to attach the device.Hidetoshi Shimokawa2003-08-042-7/+14
| | | | | | | | | | | Tested by: wilko - Detect memory mapping failure of registers by checking OHCI version. Tested by: KONDOU, Kazuhiro <kazuhiro@alib.jp> Notes: svn path=/head/; revision=118416
* Workaround for gcc on alpha/ia64.Hidetoshi Shimokawa2003-08-011-6/+4
| | | | | | | (warning: `xferq' might be used uninitialized in this function) Notes: svn path=/head/; revision=118312
* Clean up fwdev.Hidetoshi Shimokawa2003-08-014-211/+234
| | | | | | | | Allocate iso DMA channel dynamically. This allows us to have more /dev/fw* than number of DMA channels for asyn. transactions and etc. Notes: svn path=/head/; revision=118293
* - Disable faking T_DIRECT as T_RBC because we have PIM_NO_6_BYTE now.Hidetoshi Shimokawa2003-08-011-2/+2
| | | | Notes: svn path=/head/; revision=118291
* - Detect full of DMA channel correctly.Hidetoshi Shimokawa2003-08-011-2/+1
| | | | Notes: svn path=/head/; revision=118289
* Add a PATH_INQ flag, PIM_NO_6_BYTE, which indicates the SIM never wishes toNate Lawson2003-07-281-1/+1
| | | | | | | | | | | | | receive 6 byte commands. Add a check for this flag to da(4) and cd(4) so that they honor it. This is a quick workaround for many devices (especially USB) that require da(4) quirks to operate. The more complete approach is to finish the new transport code which will be aware of the SCSI version a transport implements. MFC after: 1 day Notes: svn path=/head/; revision=118105
* Fix some recently introduced warnings. 'Declaration does not declarePeter Wemm2003-07-261-2/+2
| | | | | | | anything' etc. Notes: svn path=/head/; revision=118039
* Clean up include files.Hidetoshi Shimokawa2003-07-186-23/+6
| | | | Notes: svn path=/head/; revision=117732
* Add some debug messages.Hidetoshi Shimokawa2003-07-181-4/+6
| | | | Notes: svn path=/head/; revision=117716
* Allow retrieval of local Configuration ROM.Hidetoshi Shimokawa2003-07-121-7/+22
| | | | Notes: svn path=/head/; revision=117473
* Configuraiton ROM fix:Hidetoshi Shimokawa2003-07-091-8/+26
| | | | | | | | | - Don't bump the generation if ROM has not changed and keep it between 0x2 and 0xf. - Refetch the ROM if CRC of the businfo block has changed. Notes: svn path=/head/; revision=117350
* Add compatibility for FreeBSD-4.Hidetoshi Shimokawa2003-07-044-5/+21
| | | | Notes: svn path=/head/; revision=117228
* All current uses of pci_set_powerstate are bogus, at least in theory.Warner Losh2003-07-031-0/+2
| | | | | | | | | | | | | However, they are presently necessary due to bigger bogusness in the pci bus layer not doing the right thing on suspend/resume or on initial device probe. This is exactly the sort of thing that the BURN_BRIDGES option was invented for. Mark all of them as BURN_BRIDGES. As soon as I have the powerstate stuff properly integrated into the pci bus code, I intend to remove all these workarounds. Notes: svn path=/head/; revision=117198
* Mega busdma API commit.Scott Long2003-07-014-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour. sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen. If anyone gets panics or warnings from dflt_lock() being called, please let me know right away. Reviewed by: tmm, gibbs Notes: svn path=/head/; revision=117126
* Fix tsleep/wakup race on FreeBSD-4.Hidetoshi Shimokawa2003-07-011-2/+14
| | | | Notes: svn path=/head/; revision=117104
* Include file clean up.Hidetoshi Shimokawa2003-06-303-4/+11
| | | | Notes: svn path=/head/; revision=117067
* Fix several problems related to resume:Hidetoshi Shimokawa2003-06-284-5/+40
| | | | | | | | | | | - Initialize fc->status to process bus reset correctly after resume. - Initialize AT ring buffer pointer. - Requeue stdma to stfree for active IR buffer. - Stop DMA before suspend for safe. - Set powerstate after resume. Notes: svn path=/head/; revision=116978
* - Use fwohci_poll() instead of fwohci_intr() to process the first bus reest.Hidetoshi Shimokawa2003-06-273-3/+4
| | | | | | | - Wait 2 cycles before starting the process for fast machines. Notes: svn path=/head/; revision=116897
* Bound check for broken Configuration ROM.Hidetoshi Shimokawa2003-06-161-5/+19
| | | | Notes: svn path=/head/; revision=116435
* Fix for big endian.Hidetoshi Shimokawa2003-06-161-2/+1
| | | | Notes: svn path=/head/; revision=116433
* Revert previos change for prior release/branch.Hidetoshi Shimokawa2003-06-161-0/+21
| | | | Notes: svn path=/head/; revision=116429
* - Enable support for building Configuration ROM.Hidetoshi Shimokawa2003-06-153-19/+109
| | | | | | | - Improve probe message for S800 chips. Notes: svn path=/head/; revision=116376
* Fix crom_add_simple_text().Hidetoshi Shimokawa2003-06-151-4/+5
| | | | | | | Bytewap Configuration ROM image. Notes: svn path=/head/; revision=116374
* Add CSRVAL_VENDOR_PRIVATE.Hidetoshi Shimokawa2003-06-151-0/+7
| | | | Notes: svn path=/head/; revision=116373
* White space fix.Hidetoshi Shimokawa2003-06-151-3/+3
| | | | Notes: svn path=/head/; revision=116360
* Merge common XPT_CALC_GEOMETRY functions into a single convenience function.Nate Lawson2003-06-141-17/+2
| | | | | | | | | | | | | | | | Devices below may experience a change in geometry. * Due to a bug, aic(4) never used extended geometry. Changes all drives >1G to now use extended translation. * sbp(4) drives exactly 1 GB in size now no longer use extended geometry. * umass(4) drives exactly 1 GB in size now no longer use extended geometry. For all other controllers in this commit, this should be a no-op. Looked over by: scottl Notes: svn path=/head/; revision=116351
* Fix typo in the previous revision.Hidetoshi Shimokawa2003-06-101-1/+1
| | | | Notes: svn path=/head/; revision=116150
* Fix struct bus_info on big-endian machines.Hidetoshi Shimokawa2003-06-101-3/+20
| | | | Notes: svn path=/head/; revision=116140