summaryrefslogtreecommitdiffstats
path: root/sys/dev/firewire
Commit message (Collapse)AuthorAgeFilesLines
* Enhance debugging mode by storing the string "BB:TT:LL" once and usesbruno2009-02-181-150/+143
| | | | | | | | | | | | it instead of overloading sbp_show_sdev_info(). replace calls to printf with calls to device_printf and cleanup debug messages Remove a bit of dead, commented out code. Reviewed by: scottl(mentor) MFC after: 2 weeks
* Introduce 1394a-2000 extended PHY Self ID packets.sbruno2009-02-172-8/+29
| | | | | | | | | | Deprecate unused phy_delay Self ID field as it was removed by 1394a-2000. Attempt to parse extended Self ID PHY packets if they are detected Reviewed by: scottl (mentor) MFC after: 2 weeks
* Simplify some debugging messages and try to consolodate some of the moresbruno2009-02-171-65/+109
| | | | | | | | | | | interesting conditional printf's into single device_printf's Change a couple of variable names so that I don't have to trace what they acutally do anymore. Enable the display of the Self ID PHY packet if firewire_debug > 0 Reviewed by: scottl(mentor) MFC after: 2 weeks
* Synopsis:sbruno2009-02-171-6/+55
| | | | | | | | | | | | | | | | | | | | | | | | | If speed of link between two devices is slower than the reported max speed of both endpoints, the current driver will fail and be unable to negotiate. Summary: Test negotiated speed by reading the CSRROM into a dummy variable. If that read fails, decrement our speed and retry. If all else fails, go to lowest speed possible(0). Report speed to the user. Add display of the Bus Info Block when debug.firewire_debug > 1 Support the Bus Info Block(1394a-2000) method of speed detection. I also should note that I am moving "hold_count" to 0 for future releases. This variable determines how many bus resets to "hold" a removed firewire device before deletion. I don't feel this is useful and will probably drop support for this sysctl in the future. Reviewed by: scottl(mentor) MFC after: 2 weeks
* Update the Self ID structure to conform to 1394a-2000.sbruno2009-02-131-18/+50
| | | | | | Delete the unused defines. Reviewed by: scottl
* Remove redundant while () from loop.sbruno2009-02-131-1/+1
| | | | | Submitted by: Ganbold <ganbold@micom.mng.net> Reviewed by: scottl
* Enhance debug messages and attempt to unify them into one format where possible.sbruno2009-02-121-10/+12
| | | | Reviewed by: scottl
* Update comments around various structs.sbruno2009-02-123-9/+27
| | | | Add speeds S800, S1600 and S3200
* Do not self-initialize a variable.fjoe2009-02-092-2/+2
| | | | | Found with: Coverity Prevent(tm) CID: 3864, 3865
* Remove unused variable.fjoe2009-02-091-2/+1
| | | | | Found with: Coverity Prevent(tm) CID: 3693
* Delete fwohci_filt() as it is now unusedsbruno2009-02-031-1/+0
| | | | | Obtained from: Marius Strobl <marius@alchemy.franken.de> MFC after: 2 weeks
* Some updates and bug squashing in the firewire stack.sbruno2009-02-015-69/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the interupt handler to a driver_intr_t type function as it was trying to do way to much for a lightweight filter interrupt function. Introduce much more locking around fc->mtx. Tested this for lock reversals and other such lockups. Locking seems to be working better, but there is much more to do with regard to locking. The most significant lock is in the BUS RESET handler. It was possible, before this checkin, to set a bus reset via "fwcontrol -r" and have the BUS RESET handler fire before the code responsible for asserting BUS RESET was complete. This locking fixes that issue. Move some of the memory allocations in the fc struct to the attach function in firewire.c Rework the businfo.generation indicator to be merely a on/off bit now. It's purpose according to spec is to notify the bus that the config ROM has changed. That's it. Catch and squash a possible panic in SBP where in the SBP_LOCK was held during a possible error case. The error handling code would definitely panic as it would try to acquire the SBP_LOCK on entrance. Catch and squash a camcontrol/device lockup when firewire drives go away. When a firewire device was powered off or disconnected from the firewire bus, a "camcontrol rescan all" would hang trying to poll removed devices as they were not properly detached. Don't do that. Approved by: scottl MFC after: 2 weeks
* Step 1.5 of importing the network stack virtualization infrastructurezec2008-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from the vimage project, as per plan established at devsummit 08/08: http://wiki.freebsd.org/Image/Notes200808DevSummit Introduce INIT_VNET_*() initializer macros, VNET_FOREACH() iterator macros, and CURVNET_SET() context setting macros, all currently resolving to NOPs. Prepare for virtualization of selected SYSCTL objects by introducing a family of SYSCTL_V_*() macros, currently resolving to their global counterparts, i.e. SYSCTL_V_INT() == SYSCTL_INT(). Move selected #defines from sys/sys/vimage.h to newly introduced header files specific to virtualized subsystems (sys/net/vnet.h, sys/netinet/vinet.h etc.). All the changes are verified to have zero functional impact at this point in time by doing MD5 comparision between pre- and post-change object files(*). (*) netipsec/keysock.c did not validate depending on compile time options. Implemented by: julian, bz, brooks, zec Reviewed by: julian, bz, brooks, kris, rwatson, ... Approved by: julian (mentor) Obtained from: //depot/projects/vimage-commit2/... X-MFC after: never Sponsored by: NLnet Foundation, The FreeBSD Foundation
* Replace all calls to minor() with dev2unit().ed2008-09-272-2/+2
| | | | | | | | | | | | | | | After I removed all the unit2minor()/minor2unit() calls from the kernel yesterday, I realised calling minor() everywhere is quite confusing. Character devices now only have the ability to store a unit number, not a minor number. Remove the confusion by using dev2unit() everywhere. This commit could also be considered as a bug fix. A lot of drivers call minor(), while they should actually be calling dev2unit(). In -CURRENT this isn't a problem, but it turns out we never had any problem reports related to that issue in the past. I suspect not many people connect more than 256 pieces of the same hardware. Reviewed by: kib
* Commit step 1 of the vimage project, (network stack)bz2008-08-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | virtualization work done by Marko Zec (zec@). This is the first in a series of commits over the course of the next few weeks. Mark all uses of global variables to be virtualized with a V_ prefix. Use macros to map them back to their global names for now, so this is a NOP change only. We hope to have caught at least 85-90% of what is needed so we do not invalidate a lot of outstanding patches again. Obtained from: //depot/projects/vimage-commit2/... Reviewed by: brooks, des, ed, mav, julian, jamie, kris, rwatson, zec, ... (various people I forgot, different versions) md5 (with a bit of help) Sponsored by: NLnet Foundation, The FreeBSD Foundation X-MFC after: never V_Commit_Message_Reviewed_By: more people than the patch
* - Fix panic on detach.simokawa2008-05-102-4/+4
| | | | | | - Fix a comment. MFC after: 2 weeks
* - Disable interrupts on suspend to eliminate excessivesimokawa2008-05-101-4/+9
| | | | | | | 'device physically ejected?' message on resume. - Fix memory leak on resume reported by kiyohara at netbsd.org. MFC after: 2 weeks
* Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT.ru2008-03-252-26/+10
| | | | | | | | | | Removed dead code that assumed that M_TRYWAIT can return NULL; it's not true since the advent of MBUMA. Reviewed by: arch There are ongoing disputes as to whether we want to switch to directly using UMA flags M_WAITOK/M_NOWAIT for mbuf(9) allocation.
* Rename the kthread_xxx (e.g. kthread_create()) callsjulian2007-10-201-2/+2
| | | | | | | | | | | to kproc_xxx as they actually make whole processes. Thos makes way for us to add REAL kthread_create() and friends that actually make theads. it turns out that most of these calls actually end up being moved back to the thread version when it's added. but we need to make this cosmetic change first. I'd LOVE to do this rename in 7.0 so that we can eventually MFC the new kthread_xxx() calls.
* Protect transaction labels by its own lock to reduce lock contention.simokawa2007-07-202-12/+17
| | | | Approved by: re (rwatson)
* Improve acquisition of transaction labels.simokawa2007-07-152-20/+17
| | | | | | | | - Keep last transaction label for each destination. - If the next label is not free, just give up. - This should reduce CPU load for TX on if_fwip under heavy load. Approved by: re (hrs)
* Fix a bug of retrieving configuration ROM.simokawa2007-07-081-2/+2
| | | | | | | | | | - Handle directories and leaves other than unit directories and text leaves correctly. - Now we can retrieve CROM of iSight correctly. Approved by: re (hrs) Tested by: flz MFC after: 3 days
* Prepare for future integration between CAM and newbus. xpt_bus_registerscottl2007-06-172-2/+2
| | | | | | | now takes a device_t to be the parent of the bus that is being created. Most SIMs have been updated with a reasonable argument, but a few exceptions just pass NULL for now. This argument isn't used yet and the newbus integration likely won't be ready until after 7.0-RELEASE.
* - Lock sbp_write_cmd() and ORB_POINTER_ACTIVE flag.simokawa2007-06-161-11/+41
| | | | | | | - Remove unnecessary timestamps. - Return CAM_RESRC_UNAVAIL for ORB shortage. - Fix a lock problem when doorbell is used. - Fix a potential bug for unordered execution.
* - Suppress compiler optimization so that orb[1] must be written first.simokawa2007-06-141-2/+7
| | | | | | We may need an explicit memory barrier for other architectures other than i386/amd64. MFC after: 3 days
* Timestamp after sent.simokawa2007-06-082-4/+4
|
* Fix a race after a bus reset.simokawa2007-06-082-14/+16
| | | | | - We are in FWBUSINIT state just after SID interrupt. - Do not pass normal xfers before bus probe is done.
* Include now unused var within #if 0 where it come back if the othermjacob2007-06-081-0/+2
| | | | #if 0 code comes back- quiets gcc 4.2
* Add a tunable hw.firewire.phydma_enable.simokawa2007-06-073-6/+19
| | | | | | | | This is enabled by default. It should be disabled for those who are uneasy with peeking/poking from FireWire. Please note sbp(4) and dcons(4) over FireWire need this feature.
* Fix a typo to make this file compilegallatin2007-06-061-1/+1
|
* MFp4: MPSAFE firewire stack.simokawa2007-06-0614-497/+849
| | | | | | | | | | | | | - lock its own locks and drop Giant. - create its own taskqueue thread. - split interrupt routine - use interrupt filter as a fast interrupt. - run watchdog timer in taskqueue so that it should be serialized with the bottom half. - add extra sanity check for transaction labels. disable ad-hoc workaround for unknown tlabels. - add sleep/wakeup synchronization primitives - don't reset OHCI in fwohci_stop()
* Make sure fwsid is not NULL.simokawa2007-05-211-1/+3
| | | | MFC after: 3 days
* MFp4: Simplify the bus probe routin using a kthread.simokawa2007-05-212-349/+237
| | | | MFC after: 1 week
* - Initialize login->id and fix problem for non-zero login id.simokawa2007-05-111-1/+2
| | | | | | - Increase maxopenings for multiple lun/initiators. MFC after: 3 days
* MFp4: Improve asynchronous packet receive process.simokawa2007-04-302-32/+73
| | | | | | | | - Wake up DMA engine after adding a new receive buffer. - Skip buffers which have unknown state after error. - More rigid error detection. MFC after: 1 week
* MFp4:simokawa2007-04-301-9/+11
| | | | | | | - Update state in fw_xferq_dorain() after removed from the send queue. - Remove unnecessary 'goto err;". MFC after: 1 week
* MFp4: Fix broken userland API for async packets.simokawa2007-04-306-197/+247
| | | | | | | | - Introduce fw_xferlist_add/remove(). - Introduce fw_read/write_async(). - Remove unused FWACT_CH. MFC after: 1 week
* MFp4: Fix typo in recv spd.simokawa2007-04-301-1/+1
| | | | MFC after: 1 week
* MFp4: Add a sysctl knob to disable cycle master mode and add some comments.simokawa2007-04-301-1/+9
| | | | MFC after: 1 week
* MFp4: remove unused fw_asybusy().simokawa2007-04-302-15/+0
| | | | MFC after: 1 week
* MFp4: Simplify tlabel handlingsimokawa2007-04-302-40/+30
| | | | | | | | - Remove struct tl_label and runtime malloc() for it. - Include tl_lable list in struct fw_xfer. - Don't free unallocated tlabel. MFC after: 1 week
* Initialize configuration ROM before a bus reset.simokawa2007-04-303-4/+5
| | | | MFC: after 3 days
* Configuration ROM length should be unsigned.simokawa2007-04-242-2/+2
| | | | MFC: 1 week
* s/destory/destroy/ (except for the code in contrib/).pjd2007-04-161-1/+1
|
* Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM willscottl2007-04-152-1/+2
| | | | | | | | | | | use to synchornize and protect all data objects that are used for that SIM. Drivers that are not yet MPSAFE register Giant and operate as usual. RIght now, no drivers are MPSAFE, though a few will be changed in the coming week as this work settles down. The driver API has changed, so all CAM drivers will need to be recompiled. The userland API has not changed, so tools like camcontrol do not need to be recompiled.
* Teardown interrupt only when sc->ih is not NULL.simokawa2007-03-301-11/+10
| | | | MFC after: 3 days
* Free tlabel in fw_xfer_done().simokawa2007-03-301-2/+1
|
* - Don't call fw_busreset() in firewire_attach().simokawa2007-03-301-1/+0
| | | | | | | This should fix the problem that the first bus reset is sometimes ignored because of FWBUSRESET status. MFC after: 3 days
* Poll only while interrupt is disabled.simokawa2007-03-191-4/+6
| | | | MFC: 3 days after
* Wait SCLK to be stable after LPS enabled.simokawa2007-03-191-0/+2
| | | | | | | This should fix NMI problem in fwphy_rddata(). PR: kern/94146 kern/100356 MFC: after 3 days
OpenPOWER on IntegriCloud