aboutsummaryrefslogtreecommitdiffstats
BranchCommit messageAuthorAge
archive/unc-master-3.0P-FP: fix BUG_ON releated to priority inheritanceBjoern Brandenburg13 years
archived-2013.1uncachedev: mmap memory that is not cached by CPUsGlenn Elliott12 years
archived-private-masterMerge branch 'wip-2.6.34' into old-private-masterAndrea Bastoni15 years
archived-semi-partMerge branch 'wip-semi-part' of ssh://cvs/cvs/proj/litmus/repo/litmus2010 int...Andrea Bastoni15 years
demoFurther refinementsJonathan Herman14 years
ecrts-pgm-finalMerge branch 'wip-ecrts14-pgm' of ssh://rtsrv.cs.unc.edu/home/litmus/litmus-r...Glenn Elliott12 years
ecrts14-pgm-finalMerge branch 'wip-ecrts14-pgm' of ssh://rtsrv.cs.unc.edu/home/litmus/litmus-r...Glenn Elliott12 years
gpusync-rtss12Final GPUSync implementation.Glenn Elliott12 years
gpusync/stagingRename IKGLP R2DGLP.Glenn Elliott12 years
linux-tipMerge branch 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/p...Linus Torvalds15 years
litmus2008-patch-seriesadd i386 feather-trace implementationBjoern B. Brandenburg16 years
masterPSN-EDF: use inferred_sporadic_job_release_atBjoern Brandenburg9 years
pgmmake it compileGlenn Elliott12 years
prop/litmus-signalsInfrastructure for Litmus signals.Glenn Elliott13 years
prop/robust-tie-breakFixed bug in edf_higher_prio().Glenn Elliott13 years
stagingFix tracepoint compilation errorFelipe Cerqueira13 years
test9/23/2016Namhoon Kim9 years
tracing-develTest kernel tracing events capabilitiesAndrea Bastoni16 years
v2.6.34-with-arm-patchessmsc911x: Add spinlocks around registers accessCatalin Marinas15 years
v2015.1Add ARM syscall def for get_current_budgetBjoern Brandenburg10 years
wip-2011.2-bbbLitmus core: simplify np-section protocolBjoern B. Brandenburg14 years
wip-2011.2-bbb-traceRefactor sched_trace_log_message() -> debug_trace_log_message()Andrea Bastoni14 years
wip-2012.3-gpuSOBLIV draining support for C-EDF.Glenn Elliott13 years
wip-2012.3-gpu-preportpick up last C-RM fileGlenn Elliott12 years
wip-2012.3-gpu-rtss13Fix critical bug in GPU tracker.Glenn Elliott12 years
wip-2012.3-gpu-sobliv-budget-w-ksharkProper sobliv draining and many bug fixes.Glenn Elliott12 years
wip-aedzl-finalMake it easier to compile AEDZL interfaces in liblitmus.Glenn Elliott15 years
wip-aedzl-revisedAdd sched_trace data for Apative EDZLGlenn Elliott15 years
wip-arbit-deadlineFix compilation bug.Glenn Elliott13 years
wip-aux-tasksDescription of refined aux task inheritance.Glenn Elliott13 years
wip-bbbGSN-EDF & Core: improve debug TRACE'ing for NP sectionsBjoern B. Brandenburg14 years
wip-bbb-prio-donuse correct timestampBjoern B. Brandenburg14 years
wip-better-breakImplement hash-based EDF tie-breaking.Glenn Elliott13 years
wip-binary-heapMake C-EDF work with simplified binheap_deleteGlenn Elliott14 years
wip-budgetAdded support for choices in budget policy enforcement.Glenn Elliott15 years
wip-colorSummarize schedulability with final recordJonathan Herman13 years
wip-color-jlhsched_color: Fixed two bugs causing crashing on experiment restart and a rare...Jonathan Herman13 years
wip-d10-hz1000Enable HZ=1000 on District 10Bjoern B. Brandenburg15 years
wip-default-clusteringFeature: Make default C-EDF clustering compile-time configurable.Glenn Elliott15 years
wip-dissipation-jericksoUpdate from 2.6.36 to 2.6.36.4Jeremy Erickson11 years
wip-dissipation2-jericksoUpdate 2.6.36 to 2.6.36.4Jeremy Erickson11 years
wip-ecrts14-pgmMerge branch 'wip-ecrts14-pgm' of ssh://rtsrv.cs.unc.edu/home/litmus/litmus-r...Glenn Elliott12 years
wip-edf-hsblast tested versionJonathan Herman14 years
wip-edf-osLookup table EDF-osJeremy Erickson12 years
wip-edf-tie-breakMerge branch 'wip-edf-tie-break' of ssh://rtsrv.cs.unc.edu/home/litmus/litmus...Glenn Elliott13 years
wip-edzl-critiqueUse hr_timer's active checks instead of having own flag.Glenn Elliott15 years
wip-edzl-finalImplementation of the EDZL scheduler.Glenn Elliott15 years
wip-edzl-revisedClean up comments.Glenn Elliott15 years
wip-eventsAdded support for tracing arbitrary actions.Jonathan Herman15 years
wip-extra-debugDBG: add additional tracingBjoern B. Brandenburg15 years
wip-fix-switch-jericksoAttempt to fix race condition with plugin switchingJeremy Erickson15 years
wip-fix3sched: show length of runqueue clock deactivation in /proc/sched_debugBjoern B. Brandenburg15 years
wip-fmlp-dequeueImprove FMLP queue management.Glenn Elliott15 years
wip-ft-irq-flagFeather-Trace: keep track of interrupt-related interference.Bjoern B. Brandenburg14 years
wip-gpu-cleanupEnable sched_trace log injection from userspaceGlenn Elliott13 years
wip-gpu-interruptsRemove option for threading of all softirqs.Glenn Elliott14 years
wip-gpu-rtas12Generalized GPU cost predictors + EWMA. (untested)Glenn Elliott13 years
wip-gpu-rtss12Final GPUSync implementation.Glenn Elliott13 years
wip-gpu-rtss12-srpexperimental changes to support GPUs under SRPGlenn Elliott13 years
wip-gpusync-mergeCleanup priority tracking for budget enforcement.Glenn Elliott12 years
wip-ikglpMove RSM and IKGLP imp. to own .c filesGlenn Elliott13 years
wip-k-fmlpMerge branch 'mpi-master' into wip-k-fmlpGlenn Elliott14 years
wip-kernel-coloringAdded recolor syscallNamhoon Kim8 years
wip-kernthreadsKludge work-queue processing into klitirqd.Glenn Elliott15 years
wip-klmirqd-to-auxAllow klmirqd threads to be given names.Glenn Elliott13 years
wip-ksharkMerge branch 'mpi-staging' into wip-ksharkJonathan Herman13 years
wip-litmus-3.2Merge commit 'v3.2' into litmus-stagingAndrea Bastoni13 years
wip-litmus2011.2Cleanup: Coding conformance for affinity stuff.Glenn Elliott14 years
wip-litmus3.0-2011.2Feather-Trace: keep track of interrupt-related interference.Bjoern B. Brandenburg14 years
wip-master-2.6.33-rtAvoid deadlock when switching task policy to BACKGROUND (ugly)Andrea Bastoni15 years
wip-mcRemoved ARM-specific hacks which disabled less common mixed-criticality featu...Jonathan Herman13 years
wip-mc-bipasaMC-EDF addedbipasa chattopadhyay14 years
wip-mc-jericksoSplit C/D queuesJeremy Erickson15 years
wip-mc2-cache-slackManually patched mc^2 related codeMing Yang10 years
wip-mcrit-maccosmeticMac Mollison15 years
wip-merge-3.0Prevent Linux to send IPI and queue tasks on remote CPUs.Andrea Bastoni14 years
wip-merge-v3.0Prevent Linux to send IPI and queue tasks on remote CPUs.Andrea Bastoni14 years
wip-migration-affinityNULL affinity dereference in C-EDF.Glenn Elliott14 years
wip-mmap-uncacheshare branch with othersGlenn Elliott13 years
wip-modechangeRTSS 2017 submissionNamhoon Kim8 years
wip-nested-lockingAppears to be working.Bryan Ward12 years
wip-omlp-gedfFirst implementation of G-OMLP.Glenn Elliott15 years
wip-paiSome cleanup of PAIGlenn Elliott14 years
wip-percore-lib9/21/2016Namhoon Kim9 years
wip-performanceCONFIG_DONT_PREEMPT_ON_TIE: Don't preeempt a scheduled task on priority tie.Glenn Elliott14 years
wip-pgmAdd PGM support to C-FLGlenn Elliott12 years
wip-pgm-splitFirst draft of C-FL-splitNamhoon Kim12 years
wip-pm-ovdAdd preemption-and-migration overhead tracing supportAndrea Bastoni15 years
wip-prio-inhP-EDF updated to use the generic pi framework.Glenn Elliott15 years
wip-prioq-dglBUG FIX: Support DGLs with PRIOQ_MUTEXGlenn Elliott13 years
wip-refactored-gedfGeneralizd architecture for GEDF-style scheduelrs to reduce code redundancy.Glenn Elliott15 years
wip-release-master-fixbugfix: release master CPU must signal task was pickedBjoern B. Brandenburg14 years
wip-robust-tie-breakEDF priority tie-breaks.Glenn Elliott13 years
wip-rt-ksharkMove task time accounting into the complete_job method.Jonathan Herman13 years
wip-rtas12-pgmScheduling of PGM jobs.Glenn Elliott13 years
wip-semi-partFix compile error with newer GCCJeremy Erickson12 years
wip-semi-part-edfos-jericksoUse initial CPU set by clientJeremy Erickson12 years
wip-shared-libTODO: Fix condition checks in replicate_page_move_mapping()Namhoon Kim9 years
wip-shared-lib2RTAS 2017 Submission ver.Namhoon Kim9 years
wip-shared-memInitial commit for shared libraryNamhoon Kim9 years
wip-splitting-jericksoFix release behaviorJeremy Erickson13 years
wip-splitting-omlp-jericksoBjoern's Dissertation Code with Priority DonationJeremy Erickson13 years
wip-stage-binheapAn efficient binary heap implementation.Glenn Elliott13 years
wip-sun-portDynamic memory allocation and clean exit for FeatherTraceChristopher Kenna15 years
wip-timer-tracebugfix: C-EDF, clear scheduled field of the correct CPU upon task_exitAndrea Bastoni15 years
wip-tracepointsAdd kernel-style events for sched_trace_XXX() functionsAndrea Bastoni14 years
 
TagDownloadAuthorAge
2015.1commit 8e51b37822...Bjoern Brandenburg10 years
2013.1commit bcaacec1ca...Glenn Elliott12 years
2012.3commit c158b5fbe4...Jonathan Herman13 years
2012.2commit b53c479a0f...Glenn Elliott13 years
2012.1commit 83b11ea1c6...Bjoern B. Brandenburg14 years
rtas12-mc-beta-expcommit 8e236ee20f...Christopher Kenna14 years
2011.1commit d11808b5c6...Christopher Kenna15 years
v2.6.37-rc4commit e8a7e48bb2...Linus Torvalds15 years
v2.6.37-rc3commit 3561d43fd2...Linus Torvalds15 years
v2.6.37-rc2commit e53beacd23...Linus Torvalds15 years
v2.6.37-rc1commit c8ddb2713c...Linus Torvalds15 years
v2.6.36commit f6f94e2ab1...Linus Torvalds15 years
2010.2commit 5c5456402d...Bjoern B. Brandenburg15 years
v2.6.36-rc8commit cd07202cc8...Linus Torvalds15 years
v2.6.36-rc7commit cb655d0f3d...Linus Torvalds15 years
v2.6.36-rc6commit 899611ee7d...Linus Torvalds15 years
v2.6.36-rc5commit b30a3f6257...Linus Torvalds15 years
v2.6.36-rc4commit 49553c2ef8...Linus Torvalds15 years
v2.6.36-rc3commit 2bfc96a127...Linus Torvalds15 years
v2.6.36-rc2commit 76be97c1fc...Linus Torvalds15 years
v2.6.36-rc1commit da5cabf80e...Linus Torvalds15 years
v2.6.35commit 9fe6206f40...Linus Torvalds15 years
v2.6.35-rc6commit b37fa16e78...Linus Torvalds15 years
v2.6.35-rc5commit 1c5474a65b...Linus Torvalds15 years
v2.6.35-rc4commit 815c4163b6...Linus Torvalds15 years
v2.6.35-rc3commit 7e27d6e778...Linus Torvalds15 years
v2.6.35-rc2commit e44a21b726...Linus Torvalds15 years
v2.6.35-rc1commit 67a3e12b05...Linus Torvalds15 years
2010.1commit 7c1ff4c544...Andrea Bastoni15 years
v2.6.34commit e40152ee1e...Linus Torvalds15 years
v2.6.33.4commit 4640b4e7d9...Greg Kroah-Hartman15 years
v2.6.34-rc7commit b57f95a382...Linus Torvalds15 years
v2.6.34-rc6commit 66f41d4c5c...Linus Torvalds15 years
v2.6.33.3commit 3e7ad8ed97...Greg Kroah-Hartman15 years
v2.6.34-rc5commit 01bf0b6457...Linus Torvalds15 years
v2.6.34-rc4commit 0d0fb0f9c5...Linus Torvalds15 years
v2.6.33.2commit 19f00f070c...Greg Kroah-Hartman16 years
v2.6.34-rc3commit 2eaa9cfdf3...Linus Torvalds16 years
v2.6.34-rc2commit 220bf991b0...Linus Torvalds16 years
v2.6.33.1commit dbdafe5ccf...Greg Kroah-Hartman16 years
v2.6.34-rc1commit 57d54889cd...Linus Torvalds16 years
v2.6.33commit 60b341b778...Linus Torvalds16 years
v2.6.33-rc8commit 724e6d3fe8...Linus Torvalds16 years
v2.6.33-rc7commit 29275254ca...Linus Torvalds16 years
v2.6.33-rc6commit abe94c756c...Linus Torvalds16 years
v2.6.33-rc5commit 92dcffb916...Linus Torvalds16 years
v2.6.33-rc4commit 7284ce6c9f...Linus Torvalds16 years
v2.6.33-rc3commit 74d2e4f8d7...Linus Torvalds16 years
v2.6.33-rc2commit 6b7b284958...Linus Torvalds16 years
v2.6.33-rc1commit 55639353a0...Linus Torvalds16 years
v2.6.32commit 22763c5cf3...Linus Torvalds16 years
v2.6.32-rc8commit 648f4e3e50...Linus Torvalds16 years
v2.6.32-rc7commit 156171c71a...Linus Torvalds16 years
v2.6.32-rc6commit b419148e56...Linus Torvalds16 years
v2.6.32-rc5commit 012abeea66...Linus Torvalds16 years
v2.6.32-rc4commit 161291396e...Linus Torvalds16 years
v2.6.32-rc3commit 374576a8b6...Linus Torvalds16 years
v2.6.32-rc1commit 17d857be64...Linus Torvalds16 years
v2.6.32-rc2commit 17d857be64...Linus Torvalds16 years
v2.6.31commit 74fca6a428...Linus Torvalds16 years
v2.6.31-rc9commit e07cccf404...Linus Torvalds16 years
v2.6.31-rc8commit 326ba5010a...Linus Torvalds16 years
v2.6.31-rc7commit 422bef879e...Linus Torvalds16 years
v2.6.31-rc6commit 64f1607ffb...Linus Torvalds16 years
v2.6.31-rc5commit ed680c4ad4...Linus Torvalds16 years
v2.6.31-rc4commit 4be3bd7849...Linus Torvalds16 years
v2.6.31-rc3commit 6847e154e3...Linus Torvalds16 years
v2.6.31-rc2commit 8e4a718ff3...Linus Torvalds16 years
v2.6.31-rc1commit 28d0325ce6...Linus Torvalds16 years
v2.6.30commit 07a2039b8e...Linus Torvalds16 years
v2.6.30-rc8commit 9fa7eb283c...Linus Torvalds16 years
v2.6.30-rc7commit 59a3759d0f...Linus Torvalds16 years
v2.6.30-rc6commit 1406de8e11...Linus Torvalds16 years
v2.6.30-rc5commit 091bf7624d...Linus Torvalds16 years
v2.6.30-rc4commit 091438dd56...Linus Torvalds16 years
v2.6.30-rc3commit 0910697403...Linus Torvalds16 years
v2.6.30-rc2commit 0882e8dd3a...Linus Torvalds16 years
v2.6.30-rc1commit 577c9c456f...Linus Torvalds16 years
v2.6.29commit 8e0ee43bc2...Linus Torvalds17 years
v2.6.29-rc8commit 041b62374c...Linus Torvalds17 years
v2.6.29-rc7commit fec6c6fec3...Linus Torvalds17 years
v2.6.29-rc6commit 20f4d6c3a2...Linus Torvalds17 years
v2.6.29-rc5commit d2f8d7ee1a...Linus Torvalds17 years
v2.6.29-rc4commit 8e4921515c...Linus Torvalds17 years
v2.6.29-rc3commit 18e352e4a7...Linus Torvalds17 years
v2.6.29-rc2commit 1de9e8e70f...Linus Torvalds17 years
v2.6.29-rc1commit c59765042f...Linus Torvalds17 years
v2.6.28commit 4a6908a3a0...Linus Torvalds17 years
v2.6.28-rc9commit 929096fe9f...Linus Torvalds17 years
v2.6.28-rc8commit 8b1fae4e42...Linus Torvalds17 years
v2.6.28-rc7commit 061e41fdb5...Linus Torvalds17 years
v2.6.28-rc6commit 13d428afc0...Linus Torvalds17 years
v2.6.28-rc5commit 9bf1a2445f...Linus Torvalds17 years
v2.6.28-rc4commit f7160c7573...Linus Torvalds17 years
v2.6.28-rc3commit 45beca08dd...Linus Torvalds17 years
v2.6.28-rc2commit 0173a3265b...Linus Torvalds17 years
v2.6.28-rc1commit 57f8f7b60d...Linus Torvalds17 years
v2.6.27commit 3fa8749e58...Linus Torvalds17 years
v2.6.27-rc9commit 4330ed8ed4...Linus Torvalds17 years
v2.6.27-rc8commit 94aca1dac6...Linus Torvalds17 years
v2.6.27-rc7commit 72d31053f6...Linus Torvalds17 years
v2.6.27-rc6commit adee14b2e1...Linus Torvalds17 years
v2.6.27-rc5commit 24342c34a0...Linus Torvalds17 years
v2.6.27-rc4commit 6a55617ed5...Linus Torvalds17 years
v2.6.27-rc3commit 30a2f3c60a...Linus Torvalds17 years
v2.6.27-rc2commit 0967d61ea0...Linus Torvalds17 years
v2.6.27-rc1commit 6e86841d05...Linus Torvalds17 years
v2.6.26commit bce7f793da...Linus Torvalds17 years
v2.6.26-rc9commit b7279469d6...Linus Torvalds17 years
v2.6.26-rc8commit 543cf4cb3f...Linus Torvalds17 years
v2.6.26-rc7commit d70ac829b7...Linus Torvalds17 years
v2.6.26-rc6commit 5dd34572ad...Linus Torvalds17 years
v2.6.26-rc5commit 53c8ba9540...Linus Torvalds17 years
v2.6.26-rc4commit e490517a03...Linus Torvalds17 years
v2.6.26-rc3commit b8291ad07a...Linus Torvalds17 years
v2.6.26-rc2commit 492c2e476e...Linus Torvalds17 years
v2.6.26-rc1commit 2ddcca36c8...Linus Torvalds17 years
v2.6.25commit 4b119e21d0...Linus Torvalds17 years
v2.6.25-rc9commit 120dd64cac...Linus Torvalds17 years
v2.6.25-rc8commit 0e81a8ae37...Linus Torvalds18 years
v2.6.25-rc7commit 05dda977f2...Linus Torvalds18 years
v2.6.25-rc6commit a978b30af3...Linus Torvalds18 years
v2.6.25-rc5commit cdeeeae056...Linus Torvalds18 years
v2.6.25-rc4commit 29e8c3c304...Linus Torvalds18 years
v2.6.25-rc3commit bfa274e243...Linus Torvalds18 years
v2.6.25-rc2commit 101142c37b...Linus Torvalds18 years
v2.6.25-rc1commit 19af35546d...Linus Torvalds18 years
v2.6.24commit 49914084e7...Linus Torvalds18 years
v2.6.24-rc8commit cbd9c88369...Linus Torvalds18 years
v2.6.24-rc7commit 3ce5445046...Linus Torvalds18 years
v2.6.24-rc6commit ea67db4cdb...Linus Torvalds18 years
v2.6.24-rc5commit 82d29bf6dc...Linus Torvalds18 years
v2.6.24-rc4commit 09b56adc98...Linus Torvalds18 years
v2.6.24-rc3commit d9f8bcbf67...Linus Torvalds18 years
v2.6.24-rc2commit dbeeb816e8...Linus Torvalds18 years
v2.6.24-rc1commit c9927c2bf4...Linus Torvalds18 years
v2.6.23commit bbf25010f1...Linus Torvalds18 years
v2.6.23-rc9commit 3146b39c18...Linus Torvalds18 years
v2.6.23-rc8commit 4942de4a0e...Linus Torvalds18 years
v2.6.23-rc7commit 81cfe79b9c...Linus Torvalds18 years
v2.6.23-rc6commit 0d4cbb5e7f...Linus Torvalds18 years
v2.6.23-rc5commit 40ffbfad6b...Linus Torvalds18 years
v2.6.23-rc4commit b07d68b5ca...Linus Torvalds18 years
v2.6.23-rc3commit 39d3520c92...Linus Torvalds18 years
v2.6.23-rc2commit d4ac2477fa...Linus Torvalds18 years
v2.6.23-rc1commit f695baf2df...Linus Torvalds18 years
v2.6.22commit 7dcca30a32...Linus Torvalds18 years
v2.6.22-rc7commit a38d6181ff...Linus Torvalds18 years
v2.6.22-rc6commit 189548642c...Linus Torvalds18 years
v2.6.22-rc5commit 188e1f81ba...Linus Torvalds18 years
v2.6.22-rc4commit 5ecd3100e6...Linus Torvalds18 years
v2.6.22-rc3commit c420bc9f09...Linus Torvalds18 years
v2.6.22-rc2commit 55b637c6a0...Linus Torvalds18 years
v2.6.22-rc1commit 39403865d2...Linus Torvalds18 years
v2.6.21commit de46c33745...Linus Torvalds18 years
v2.6.21-rc7commit 94a05509a9...Linus Torvalds18 years
v2.6.21-rc6commit a21bd69e15...Linus Torvalds18 years
v2.6.21-rc5commit e0f2e3a06b...Linus Torvalds19 years
v2.6.21-rc4commit db98e0b434...Linus Torvalds19 years
v2.6.21-rc3commit 08e15e81a4...Linus Torvalds19 years
v2.6.21-rc2commit 606135a308...Linus Torvalds19 years
v2.6.21-rc1commit c8f71b01a5...Linus Torvalds19 years
v2.6.20commit 62d0cfcb27...Linus Torvalds19 years
v2.6.20-rc7commit f56df2f4db...Linus Torvalds19 years
v2.6.20-rc6commit 99abfeafb5...Linus Torvalds19 years
v2.6.20-rc5commit a8b3485287...Linus Torvalds19 years
v2.6.20-rc4commit bf81b46482...Linus Torvalds19 years
v2.6.20-rc3commit 669df1b478...Linus Torvalds19 years
v2.6.20-rc2commit 3bf8ba38f3...Linus Torvalds19 years
v2.6.20-rc1commit cc016448b0...Linus Torvalds19 years
v2.6.19commit 0215ffb08c...Linus Torvalds19 years
v2.6.19-rc6commit 44597f65f6...Linus Torvalds19 years
v2.6.19-rc5commit 80c2188127...Linus Torvalds19 years
v2.6.19-rc4commit ae99a78af3...Linus Torvalds19 years
v2.6.19-rc3commit 7059abedd2...Linus Torvalds19 years
v2.6.19-rc2commit b4bd8c6643...Linus Torvalds19 years
v2.6.19-rc1commit d223a60106...Linus Torvalds19 years
v2.6.18commit e478bec0ba...Linus Torvalds19 years
v2.6.18-rc7commit 95064a75eb...Linus Torvalds19 years
v2.6.18-rc6commit c336923b66...Linus Torvalds19 years
v2.6.18-rc5commit 60d4684068...Linus Torvalds19 years
v2.6.18-rc4commit 9f737633e6...Linus Torvalds19 years
v2.6.18-rc3commit b6ff50833a...Linus Torvalds19 years
v2.6.18-rc2commit 82d6897fef...Linus Torvalds19 years
v2.6.18-rc1commit 120bda20c6...Linus Torvalds19 years
v2.6.17commit 427abfa28a...Linus Torvalds19 years
v2.6.17-rc6commit 1def630a6a...Linus Torvalds19 years
v2.6.17-rc5commit a8bd60705a...Linus Torvalds19 years
v2.6.17-rc4commit d8c3291c73...Linus Torvalds19 years
v2.6.17-rc3commit 2be4d50295...Linus Torvalds19 years
v2.6.17-rc2commit 8bbde0e6d5...Linus Torvalds19 years
v2.6.17-rc1commit 6246b6128b...Linus Torvalds20 years
v2.6.16commit 7705a8792b...Linus Torvalds20 years
v2.6.16-rc6commit 535744878e...Linus Torvalds20 years
v2.6.16-rc5commit b9a33cebac...Linus Torvalds20 years
v2.6.16-rc4commit bd71c2b174...Linus Torvalds20 years
v2.6.16-rc3commit e9bb4c9929...Linus Torvalds20 years
v2.6.16-rc2commit 826eeb53a6...Linus Torvalds20 years
v2.6.16-rc1commit 2664b25051...Linus Torvalds20 years
v2.6.15commit 88026842b0...Linus Torvalds20 years
v2.6.15-rc7commit f89f5948fc...Linus Torvalds20 years
v2.6.15-rc6commit df7addbb45...Linus Torvalds20 years
v2.6.15-rc5commit 436b0f76f2...Linus Torvalds20 years
v2.6.15-rc4commit 5666c0947e...Linus Torvalds20 years
v2.6.15-rc3commit 624f54be20...Linus Torvalds20 years
v2.6.15-rc2commit 3bedff1d73...Linus Torvalds20 years
v2.6.15-rc1commit cd52d1ee9a...Linus Torvalds20 years
v2.6.14commit 741b2252a5...Linus Torvalds20 years
v2.6.14-rc5commit 93918e9afc...Linus Torvalds20 years
v2.6.14-rc4commit 907a426179...Linus Torvalds20 years
v2.6.14-rc3commit 1c9426e8a5...Linus Torvalds20 years
v2.6.14-rc2commit 676d55ae30...Linus Torvalds20 years
v2.6.14-rc1commit 2f4ba45a75...Linus Torvalds20 years
v2.6.13commit 02b3e4e2d7...Linus Torvalds20 years
v2.6.13-rc7commit 0572e3da3f...Linus Torvalds20 years
v2.6.13-rc6commit 6fc32179de...Linus Torvalds20 years
v2.6.13-rc5commit 9a351e30d7...Linus Torvalds20 years
v2.6.13-rc4commit 6395352334...Linus Torvalds20 years
v2.6.11tree c39ae07f39...
v2.6.11-treetree c39ae07f39...
v2.6.12commit 9ee1c939d1...
v2.6.12-rc2commit 1da177e4c3...
v2.6.12-rc3commit a2755a80f4...
v2.6.12-rc4commit 88d7bd8cb9...
v2.6.12-rc5commit 2a24ab628a...
v2.6.12-rc6commit 7cef5677ef...
v2.6.13-rc1commit 4c91aedb75...
v2.6.13-rc2commit a18bcb7450...
v2.6.13-rc3commit c32511e271...
>} /* End twl_post_command_packet() */ /* This function will perform a pci-dma mapping for a scatter gather list */ static int twl_map_scsi_sg_data(TW_Device_Extension *tw_dev, int request_id) { int use_sg; struct scsi_cmnd *cmd = tw_dev->srb[request_id]; use_sg = scsi_dma_map(cmd); if (!use_sg) return 0; else if (use_sg < 0) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1, "Failed to map scatter gather list"); return 0; } cmd->SCp.phase = TW_PHASE_SGLIST; cmd->SCp.have_data_in = use_sg; return use_sg; } /* End twl_map_scsi_sg_data() */ /* This function hands scsi cdb's to the firmware */ static int twl_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id, char *cdb, int use_sg, TW_SG_Entry_ISO *sglistarg) { TW_Command_Full *full_command_packet; TW_Command_Apache *command_packet; int i, sg_count; struct scsi_cmnd *srb = NULL; struct scatterlist *sglist = NULL, *sg; int retval = 1; if (tw_dev->srb[request_id]) { srb = tw_dev->srb[request_id]; if (scsi_sglist(srb)) sglist = scsi_sglist(srb); } /* Initialize command packet */ full_command_packet = tw_dev->command_packet_virt[request_id]; full_command_packet->header.header_desc.size_header = 128; full_command_packet->header.status_block.error = 0; full_command_packet->header.status_block.severity__reserved = 0; command_packet = &full_command_packet->command.newcommand; command_packet->status = 0; command_packet->opcode__reserved = TW_OPRES_IN(0, TW_OP_EXECUTE_SCSI); /* We forced 16 byte cdb use earlier */ if (!cdb) memcpy(command_packet->cdb, srb->cmnd, TW_MAX_CDB_LEN); else memcpy(command_packet->cdb, cdb, TW_MAX_CDB_LEN); if (srb) { command_packet->unit = srb->device->id; command_packet->request_id__lunl = cpu_to_le16(TW_REQ_LUN_IN(srb->device->lun, request_id)); } else { command_packet->request_id__lunl = cpu_to_le16(TW_REQ_LUN_IN(0, request_id)); command_packet->unit = 0; } command_packet->sgl_offset = 16; if (!sglistarg) { /* Map sglist from scsi layer to cmd packet */ if (scsi_sg_count(srb)) { sg_count = twl_map_scsi_sg_data(tw_dev, request_id); if (sg_count == 0) goto out; scsi_for_each_sg(srb, sg, sg_count, i) { command_packet->sg_list[i].address = TW_CPU_TO_SGL(sg_dma_address(sg)); command_packet->sg_list[i].length = TW_CPU_TO_SGL(sg_dma_len(sg)); } command_packet->sgl_entries__lunh = cpu_to_le16(TW_REQ_LUN_IN((srb->device->lun >> 4), scsi_sg_count(tw_dev->srb[request_id]))); } } else { /* Internal cdb post */ for (i = 0; i < use_sg; i++) { command_packet->sg_list[i].address = TW_CPU_TO_SGL(sglistarg[i].address); command_packet->sg_list[i].length = TW_CPU_TO_SGL(sglistarg[i].length); } command_packet->sgl_entries__lunh = cpu_to_le16(TW_REQ_LUN_IN(0, use_sg)); } /* Update some stats */ if (srb) { tw_dev->sector_count = scsi_bufflen(srb) / 512; if (tw_dev->sector_count > tw_dev->max_sector_count) tw_dev->max_sector_count = tw_dev->sector_count; tw_dev->sgl_entries = scsi_sg_count(srb); if (tw_dev->sgl_entries > tw_dev->max_sgl_entries) tw_dev->max_sgl_entries = tw_dev->sgl_entries; } /* Now post the command to the board */ retval = twl_post_command_packet(tw_dev, request_id); out: return retval; } /* End twl_scsiop_execute_scsi() */ /* This function will read the aen queue from the isr */ static int twl_aen_read_queue(TW_Device_Extension *tw_dev, int request_id) { char cdb[TW_MAX_CDB_LEN]; TW_SG_Entry_ISO sglist[1]; TW_Command_Full *full_command_packet; int retval = 1; full_command_packet = tw_dev->command_packet_virt[request_id]; memset(full_command_packet, 0, sizeof(TW_Command_Full)); /* Initialize cdb */ memset(&cdb, 0, TW_MAX_CDB_LEN); cdb[0] = REQUEST_SENSE; /* opcode */ cdb[4] = TW_ALLOCATION_LENGTH; /* allocation length */ /* Initialize sglist */ memset(&sglist, 0, sizeof(TW_SG_Entry_ISO)); sglist[0].length = TW_SECTOR_SIZE; sglist[0].address = tw_dev->generic_buffer_phys[request_id]; /* Mark internal command */ tw_dev->srb[request_id] = NULL; /* Now post the command packet */ if (twl_scsiop_execute_scsi(tw_dev, request_id, cdb, 1, sglist)) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x2, "Post failed while reading AEN queue"); goto out; } retval = 0; out: return retval; } /* End twl_aen_read_queue() */ /* This function will sync firmware time with the host time */ static void twl_aen_sync_time(TW_Device_Extension *tw_dev, int request_id) { u32 schedulertime; struct timeval utc; TW_Command_Full *full_command_packet; TW_Command *command_packet; TW_Param_Apache *param; u32 local_time; /* Fill out the command packet */ full_command_packet = tw_dev->command_packet_virt[request_id]; memset(full_command_packet, 0, sizeof(TW_Command_Full)); command_packet = &full_command_packet->command.oldcommand; command_packet->opcode__sgloffset = TW_OPSGL_IN(2, TW_OP_SET_PARAM); command_packet->request_id = request_id; command_packet->byte8_offset.param.sgl[0].address = TW_CPU_TO_SGL(tw_dev->generic_buffer_phys[request_id]); command_packet->byte8_offset.param.sgl[0].length = TW_CPU_TO_SGL(TW_SECTOR_SIZE); command_packet->size = TW_COMMAND_SIZE; command_packet->byte6_offset.parameter_count = cpu_to_le16(1); /* Setup the param */ param = (TW_Param_Apache *)tw_dev->generic_buffer_virt[request_id]; memset(param, 0, TW_SECTOR_SIZE); param->table_id = cpu_to_le16(TW_TIMEKEEP_TABLE | 0x8000); /* Controller time keep table */ param->parameter_id = cpu_to_le16(0x3); /* SchedulerTime */ param->parameter_size_bytes = cpu_to_le16(4); /* Convert system time in UTC to local time seconds since last Sunday 12:00AM */ do_gettimeofday(&utc); local_time = (u32)(utc.tv_sec - (sys_tz.tz_minuteswest * 60)); schedulertime = local_time - (3 * 86400); schedulertime = cpu_to_le32(schedulertime % 604800); memcpy(param->data, &schedulertime, sizeof(u32)); /* Mark internal command */ tw_dev->srb[request_id] = NULL; /* Now post the command */ twl_post_command_packet(tw_dev, request_id); } /* End twl_aen_sync_time() */ /* This function will assign an available request id */ static void twl_get_request_id(TW_Device_Extension *tw_dev, int *request_id) { *request_id = tw_dev->free_queue[tw_dev->free_head]; tw_dev->free_head = (tw_dev->free_head + 1) % TW_Q_LENGTH; tw_dev->state[*request_id] = TW_S_STARTED; } /* End twl_get_request_id() */ /* This function will free a request id */ static void twl_free_request_id(TW_Device_Extension *tw_dev, int request_id) { tw_dev->free_queue[tw_dev->free_tail] = request_id; tw_dev->state[request_id] = TW_S_FINISHED; tw_dev->free_tail = (tw_dev->free_tail + 1) % TW_Q_LENGTH; } /* End twl_free_request_id() */ /* This function will complete an aen request from the isr */ static int twl_aen_complete(TW_Device_Extension *tw_dev, int request_id) { TW_Command_Full *full_command_packet; TW_Command *command_packet; TW_Command_Apache_Header *header; unsigned short aen; int retval = 1; header = (TW_Command_Apache_Header *)tw_dev->generic_buffer_virt[request_id]; tw_dev->posted_request_count--; aen = le16_to_cpu(header->status_block.error); full_command_packet = tw_dev->command_packet_virt[request_id]; command_packet = &full_command_packet->command.oldcommand; /* First check for internal completion of set param for time sync */ if (TW_OP_OUT(command_packet->opcode__sgloffset) == TW_OP_SET_PARAM) { /* Keep reading the queue in case there are more aen's */ if (twl_aen_read_queue(tw_dev, request_id)) goto out2; else { retval = 0; goto out; } } switch (aen) { case TW_AEN_QUEUE_EMPTY: /* Quit reading the queue if this is the last one */ break; case TW_AEN_SYNC_TIME_WITH_HOST: twl_aen_sync_time(tw_dev, request_id); retval = 0; goto out; default: twl_aen_queue_event(tw_dev, header); /* If there are more aen's, keep reading the queue */ if (twl_aen_read_queue(tw_dev, request_id)) goto out2; else { retval = 0; goto out; } } retval = 0; out2: tw_dev->state[request_id] = TW_S_COMPLETED; twl_free_request_id(tw_dev, request_id); clear_bit(TW_IN_ATTENTION_LOOP, &tw_dev->flags); out: return retval; } /* End twl_aen_complete() */ /* This function will poll for a response */ static int twl_poll_response(TW_Device_Extension *tw_dev, int request_id, int seconds) { unsigned long before; dma_addr_t mfa; u32 regh, regl; u32 response; int retval = 1; int found = 0; before = jiffies; while (!found) { if (sizeof(dma_addr_t) > 4) { regh = readl(TWL_HOBQPH_REG_ADDR(tw_dev)); regl = readl(TWL_HOBQPL_REG_ADDR(tw_dev)); mfa = ((u64)regh << 32) | regl; } else mfa = readl(TWL_HOBQPL_REG_ADDR(tw_dev)); response = (u32)mfa; if (TW_RESID_OUT(response) == request_id) found = 1; if (time_after(jiffies, before + HZ * seconds)) goto out; msleep(50); } retval = 0; out: return retval; } /* End twl_poll_response() */ /* This function will drain the aen queue */ static int twl_aen_drain_queue(TW_Device_Extension *tw_dev, int no_check_reset) { int request_id = 0; char cdb[TW_MAX_CDB_LEN]; TW_SG_Entry_ISO sglist[1]; int finished = 0, count = 0; TW_Command_Full *full_command_packet; TW_Command_Apache_Header *header; unsigned short aen; int first_reset = 0, queue = 0, retval = 1; if (no_check_reset) first_reset = 0; else first_reset = 1; full_command_packet = tw_dev->command_packet_virt[request_id]; memset(full_command_packet, 0, sizeof(TW_Command_Full)); /* Initialize cdb */ memset(&cdb, 0, TW_MAX_CDB_LEN); cdb[0] = REQUEST_SENSE; /* opcode */ cdb[4] = TW_ALLOCATION_LENGTH; /* allocation length */ /* Initialize sglist */ memset(&sglist, 0, sizeof(TW_SG_Entry_ISO)); sglist[0].length = TW_SECTOR_SIZE; sglist[0].address = tw_dev->generic_buffer_phys[request_id]; /* Mark internal command */ tw_dev->srb[request_id] = NULL; do { /* Send command to the board */ if (twl_scsiop_execute_scsi(tw_dev, request_id, cdb, 1, sglist)) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x3, "Error posting request sense"); goto out; } /* Now poll for completion */ if (twl_poll_response(tw_dev, request_id, 30)) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x4, "No valid response while draining AEN queue"); tw_dev->posted_request_count--; goto out; } tw_dev->posted_request_count--; header = (TW_Command_Apache_Header *)tw_dev->generic_buffer_virt[request_id]; aen = le16_to_cpu(header->status_block.error); queue = 0; count++; switch (aen) { case TW_AEN_QUEUE_EMPTY: if (first_reset != 1) goto out; else finished = 1; break; case TW_AEN_SOFT_RESET: if (first_reset == 0) first_reset = 1; else queue = 1; break; case TW_AEN_SYNC_TIME_WITH_HOST: break; default: queue = 1; } /* Now queue an event info */ if (queue) twl_aen_queue_event(tw_dev, header); } while ((finished == 0) && (count < TW_MAX_AEN_DRAIN)); if (count == TW_MAX_AEN_DRAIN) goto out; retval = 0; out: tw_dev->state[request_id] = TW_S_INITIAL; return retval; } /* End twl_aen_drain_queue() */ /* This function will allocate memory and check if it is correctly aligned */ static int twl_allocate_memory(TW_Device_Extension *tw_dev, int size, int which) { int i; dma_addr_t dma_handle; unsigned long *cpu_addr; int retval = 1; cpu_addr = pci_alloc_consistent(tw_dev->tw_pci_dev, size*TW_Q_LENGTH, &dma_handle); if (!cpu_addr) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x5, "Memory allocation failed"); goto out; } memset(cpu_addr, 0, size*TW_Q_LENGTH); for (i = 0; i < TW_Q_LENGTH; i++) { switch(which) { case 0: tw_dev->command_packet_phys[i] = dma_handle+(i*size); tw_dev->command_packet_virt[i] = (TW_Command_Full *)((unsigned char *)cpu_addr + (i*size)); break; case 1: tw_dev->generic_buffer_phys[i] = dma_handle+(i*size); tw_dev->generic_buffer_virt[i] = (unsigned long *)((unsigned char *)cpu_addr + (i*size)); break; case 2: tw_dev->sense_buffer_phys[i] = dma_handle+(i*size); tw_dev->sense_buffer_virt[i] = (TW_Command_Apache_Header *)((unsigned char *)cpu_addr + (i*size)); break; } } retval = 0; out: return retval; } /* End twl_allocate_memory() */ /* This function will load the request id and various sgls for ioctls */ static void twl_load_sgl(TW_Device_Extension *tw_dev, TW_Command_Full *full_command_packet, int request_id, dma_addr_t dma_handle, int length) { TW_Command *oldcommand; TW_Command_Apache *newcommand; TW_SG_Entry_ISO *sgl; unsigned int pae = 0; if ((sizeof(long) < 8) && (sizeof(dma_addr_t) > 4)) pae = 1; if (TW_OP_OUT(full_command_packet->command.newcommand.opcode__reserved) == TW_OP_EXECUTE_SCSI) { newcommand = &full_command_packet->command.newcommand; newcommand->request_id__lunl = cpu_to_le16(TW_REQ_LUN_IN(TW_LUN_OUT(newcommand->request_id__lunl), request_id)); if (length) { newcommand->sg_list[0].address = TW_CPU_TO_SGL(dma_handle + sizeof(TW_Ioctl_Buf_Apache) - 1); newcommand->sg_list[0].length = TW_CPU_TO_SGL(length); } newcommand->sgl_entries__lunh = cpu_to_le16(TW_REQ_LUN_IN(TW_LUN_OUT(newcommand->sgl_entries__lunh), length ? 1 : 0)); } else { oldcommand = &full_command_packet->command.oldcommand; oldcommand->request_id = request_id; if (TW_SGL_OUT(oldcommand->opcode__sgloffset)) { /* Load the sg list */ sgl = (TW_SG_Entry_ISO *)((u32 *)oldcommand+oldcommand->size - (sizeof(TW_SG_Entry_ISO)/4) + pae + (sizeof(dma_addr_t) > 4 ? 1 : 0)); sgl->address = TW_CPU_TO_SGL(dma_handle + sizeof(TW_Ioctl_Buf_Apache) - 1); sgl->length = TW_CPU_TO_SGL(length); oldcommand->size += pae; oldcommand->size += sizeof(dma_addr_t) > 4 ? 1 : 0; } } } /* End twl_load_sgl() */ /* This function handles ioctl for the character device This interface is used by smartmontools open source software */ static long twl_chrdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { long timeout; unsigned long *cpu_addr, data_buffer_length_adjusted = 0, flags = 0; dma_addr_t dma_handle; int request_id = 0; TW_Ioctl_Driver_Command driver_command; struct inode *inode = file->f_dentry->d_inode; TW_Ioctl_Buf_Apache *tw_ioctl; TW_Command_Full *full_command_packet; TW_Device_Extension *tw_dev = twl_device_extension_list[iminor(inode)]; int retval = -EFAULT; void __user *argp = (void __user *)arg; mutex_lock(&twl_chrdev_mutex); /* Only let one of these through at a time */ if (mutex_lock_interruptible(&tw_dev->ioctl_lock)) { retval = -EINTR; goto out; } /* First copy down the driver command */ if (copy_from_user(&driver_command, argp, sizeof(TW_Ioctl_Driver_Command))) goto out2; /* Check data buffer size */ if (driver_command.buffer_length > TW_MAX_SECTORS * 2048) { retval = -EINVAL; goto out2; } /* Hardware can only do multiple of 512 byte transfers */ data_buffer_length_adjusted = (driver_command.buffer_length + 511) & ~511; /* Now allocate ioctl buf memory */ cpu_addr = dma_alloc_coherent(&tw_dev->tw_pci_dev->dev, data_buffer_length_adjusted+sizeof(TW_Ioctl_Buf_Apache) - 1, &dma_handle, GFP_KERNEL); if (!cpu_addr) { retval = -ENOMEM; goto out2; } tw_ioctl = (TW_Ioctl_Buf_Apache *)cpu_addr; /* Now copy down the entire ioctl */ if (copy_from_user(tw_ioctl, argp, driver_command.buffer_length + sizeof(TW_Ioctl_Buf_Apache) - 1)) goto out3; /* See which ioctl we are doing */ switch (cmd) { case TW_IOCTL_FIRMWARE_PASS_THROUGH: spin_lock_irqsave(tw_dev->host->host_lock, flags); twl_get_request_id(tw_dev, &request_id); /* Flag internal command */ tw_dev->srb[request_id] = NULL; /* Flag chrdev ioctl */ tw_dev->chrdev_request_id = request_id; full_command_packet = (TW_Command_Full *)&tw_ioctl->firmware_command; /* Load request id and sglist for both command types */ twl_load_sgl(tw_dev, full_command_packet, request_id, dma_handle, data_buffer_length_adjusted); memcpy(tw_dev->command_packet_virt[request_id], &(tw_ioctl->firmware_command), sizeof(TW_Command_Full)); /* Now post the command packet to the controller */ twl_post_command_packet(tw_dev, request_id); spin_unlock_irqrestore(tw_dev->host->host_lock, flags); timeout = TW_IOCTL_CHRDEV_TIMEOUT*HZ; /* Now wait for command to complete */ timeout = wait_event_timeout(tw_dev->ioctl_wqueue, tw_dev->chrdev_request_id == TW_IOCTL_CHRDEV_FREE, timeout); /* We timed out, and didn't get an interrupt */ if (tw_dev->chrdev_request_id != TW_IOCTL_CHRDEV_FREE) { /* Now we need to reset the board */ printk(KERN_WARNING "3w-sas: scsi%d: WARNING: (0x%02X:0x%04X): Character ioctl (0x%x) timed out, resetting card.\n", tw_dev->host->host_no, TW_DRIVER, 0x6, cmd); retval = -EIO; twl_reset_device_extension(tw_dev, 1); goto out3; } /* Now copy in the command packet response */ memcpy(&(tw_ioctl->firmware_command), tw_dev->command_packet_virt[request_id], sizeof(TW_Command_Full)); /* Now complete the io */ spin_lock_irqsave(tw_dev->host->host_lock, flags); tw_dev->posted_request_count--; tw_dev->state[request_id] = TW_S_COMPLETED; twl_free_request_id(tw_dev, request_id); spin_unlock_irqrestore(tw_dev->host->host_lock, flags); break; default: retval = -ENOTTY; goto out3; } /* Now copy the entire response to userspace */ if (copy_to_user(argp, tw_ioctl, sizeof(TW_Ioctl_Buf_Apache) + driver_command.buffer_length - 1) == 0) retval = 0; out3: /* Now free ioctl buf memory */ dma_free_coherent(&tw_dev->tw_pci_dev->dev, data_buffer_length_adjusted+sizeof(TW_Ioctl_Buf_Apache) - 1, cpu_addr, dma_handle); out2: mutex_unlock(&tw_dev->ioctl_lock); out: mutex_unlock(&twl_chrdev_mutex); return retval; } /* End twl_chrdev_ioctl() */ /* This function handles open for the character device */ static int twl_chrdev_open(struct inode *inode, struct file *file) { unsigned int minor_number; int retval = -ENODEV; if (!capable(CAP_SYS_ADMIN)) { retval = -EACCES; goto out; } minor_number = iminor(inode); if (minor_number >= twl_device_extension_count) goto out; retval = 0; out: return retval; } /* End twl_chrdev_open() */ /* File operations struct for character device */ static const struct file_operations twl_fops = { .owner = THIS_MODULE, .unlocked_ioctl = twl_chrdev_ioctl, .open = twl_chrdev_open, .release = NULL, .llseek = noop_llseek, }; /* This function passes sense data from firmware to scsi layer */ static int twl_fill_sense(TW_Device_Extension *tw_dev, int i, int request_id, int copy_sense, int print_host) { TW_Command_Apache_Header *header; TW_Command_Full *full_command_packet; unsigned short error; char *error_str; int retval = 1; header = tw_dev->sense_buffer_virt[i]; full_command_packet = tw_dev->command_packet_virt[request_id]; /* Get embedded firmware error string */ error_str = &(header->err_specific_desc[strlen(header->err_specific_desc) + 1]); /* Don't print error for Logical unit not supported during rollcall */ error = le16_to_cpu(header->status_block.error); if ((error != TW_ERROR_LOGICAL_UNIT_NOT_SUPPORTED) && (error != TW_ERROR_UNIT_OFFLINE) && (error != TW_ERROR_INVALID_FIELD_IN_CDB)) { if (print_host) printk(KERN_WARNING "3w-sas: scsi%d: ERROR: (0x%02X:0x%04X): %s:%s.\n", tw_dev->host->host_no, TW_MESSAGE_SOURCE_CONTROLLER_ERROR, header->status_block.error, error_str, header->err_specific_desc); else printk(KERN_WARNING "3w-sas: ERROR: (0x%02X:0x%04X): %s:%s.\n", TW_MESSAGE_SOURCE_CONTROLLER_ERROR, header->status_block.error, error_str, header->err_specific_desc); } if (copy_sense) { memcpy(tw_dev->srb[request_id]->sense_buffer, header->sense_data, TW_SENSE_DATA_LENGTH); tw_dev->srb[request_id]->result = (full_command_packet->command.newcommand.status << 1); goto out; } out: return retval; } /* End twl_fill_sense() */ /* This function will free up device extension resources */ static void twl_free_device_extension(TW_Device_Extension *tw_dev) { if (tw_dev->command_packet_virt[0]) pci_free_consistent(tw_dev->tw_pci_dev, sizeof(TW_Command_Full)*TW_Q_LENGTH, tw_dev->command_packet_virt[0], tw_dev->command_packet_phys[0]); if (tw_dev->generic_buffer_virt[0]) pci_free_consistent(tw_dev->tw_pci_dev, TW_SECTOR_SIZE*TW_Q_LENGTH, tw_dev->generic_buffer_virt[0], tw_dev->generic_buffer_phys[0]); if (tw_dev->sense_buffer_virt[0]) pci_free_consistent(tw_dev->tw_pci_dev, sizeof(TW_Command_Apache_Header)* TW_Q_LENGTH, tw_dev->sense_buffer_virt[0], tw_dev->sense_buffer_phys[0]); kfree(tw_dev->event_queue[0]); } /* End twl_free_device_extension() */ /* This function will get parameter table entries from the firmware */ static void *twl_get_param(TW_Device_Extension *tw_dev, int request_id, int table_id, int parameter_id, int parameter_size_bytes) { TW_Command_Full *full_command_packet; TW_Command *command_packet; TW_Param_Apache *param; void *retval = NULL; /* Setup the command packet */ full_command_packet = tw_dev->command_packet_virt[request_id]; memset(full_command_packet, 0, sizeof(TW_Command_Full)); command_packet = &full_command_packet->command.oldcommand; command_packet->opcode__sgloffset = TW_OPSGL_IN(2, TW_OP_GET_PARAM); command_packet->size = TW_COMMAND_SIZE; command_packet->request_id = request_id; command_packet->byte6_offset.block_count = cpu_to_le16(1); /* Now setup the param */ param = (TW_Param_Apache *)tw_dev->generic_buffer_virt[request_id]; memset(param, 0, TW_SECTOR_SIZE); param->table_id = cpu_to_le16(table_id | 0x8000); param->parameter_id = cpu_to_le16(parameter_id); param->parameter_size_bytes = cpu_to_le16(parameter_size_bytes); command_packet->byte8_offset.param.sgl[0].address = TW_CPU_TO_SGL(tw_dev->generic_buffer_phys[request_id]); command_packet->byte8_offset.param.sgl[0].length = TW_CPU_TO_SGL(TW_SECTOR_SIZE); /* Post the command packet to the board */ twl_post_command_packet(tw_dev, request_id); /* Poll for completion */ if (twl_poll_response(tw_dev, request_id, 30)) TW_PRINTK(tw_dev->host, TW_DRIVER, 0x7, "No valid response during get param") else retval = (void *)&(param->data[0]); tw_dev->posted_request_count--; tw_dev->state[request_id] = TW_S_INITIAL; return retval; } /* End twl_get_param() */ /* This function will send an initconnection command to controller */ static int twl_initconnection(TW_Device_Extension *tw_dev, int message_credits, u32 set_features, unsigned short current_fw_srl, unsigned short current_fw_arch_id, unsigned short current_fw_branch, unsigned short current_fw_build, unsigned short *fw_on_ctlr_srl, unsigned short *fw_on_ctlr_arch_id, unsigned short *fw_on_ctlr_branch, unsigned short *fw_on_ctlr_build, u32 *init_connect_result) { TW_Command_Full *full_command_packet; TW_Initconnect *tw_initconnect; int request_id = 0, retval = 1; /* Initialize InitConnection command packet */ full_command_packet = tw_dev->command_packet_virt[request_id]; memset(full_command_packet, 0, sizeof(TW_Command_Full)); full_command_packet->header.header_desc.size_header = 128; tw_initconnect = (TW_Initconnect *)&full_command_packet->command.oldcommand; tw_initconnect->opcode__reserved = TW_OPRES_IN(0, TW_OP_INIT_CONNECTION); tw_initconnect->request_id = request_id; tw_initconnect->message_credits = cpu_to_le16(message_credits); tw_initconnect->features = set_features; /* Turn on 64-bit sgl support if we need to */ tw_initconnect->features |= sizeof(dma_addr_t) > 4 ? 1 : 0; tw_initconnect->features = cpu_to_le32(tw_initconnect->features); if (set_features & TW_EXTENDED_INIT_CONNECT) { tw_initconnect->size = TW_INIT_COMMAND_PACKET_SIZE_EXTENDED; tw_initconnect->fw_srl = cpu_to_le16(current_fw_srl); tw_initconnect->fw_arch_id = cpu_to_le16(current_fw_arch_id); tw_initconnect->fw_branch = cpu_to_le16(current_fw_branch); tw_initconnect->fw_build = cpu_to_le16(current_fw_build); } else tw_initconnect->size = TW_INIT_COMMAND_PACKET_SIZE; /* Send command packet to the board */ twl_post_command_packet(tw_dev, request_id); /* Poll for completion */ if (twl_poll_response(tw_dev, request_id, 30)) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x8, "No valid response during init connection"); } else { if (set_features & TW_EXTENDED_INIT_CONNECT) { *fw_on_ctlr_srl = le16_to_cpu(tw_initconnect->fw_srl); *fw_on_ctlr_arch_id = le16_to_cpu(tw_initconnect->fw_arch_id); *fw_on_ctlr_branch = le16_to_cpu(tw_initconnect->fw_branch); *fw_on_ctlr_build = le16_to_cpu(tw_initconnect->fw_build); *init_connect_result = le32_to_cpu(tw_initconnect->result); } retval = 0; } tw_dev->posted_request_count--; tw_dev->state[request_id] = TW_S_INITIAL; return retval; } /* End twl_initconnection() */ /* This function will initialize the fields of a device extension */ static int twl_initialize_device_extension(TW_Device_Extension *tw_dev) { int i, retval = 1; /* Initialize command packet buffers */ if (twl_allocate_memory(tw_dev, sizeof(TW_Command_Full), 0)) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x9, "Command packet memory allocation failed"); goto out; } /* Initialize generic buffer */ if (twl_allocate_memory(tw_dev, TW_SECTOR_SIZE, 1)) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0xa, "Generic memory allocation failed"); goto out; } /* Allocate sense buffers */ if (twl_allocate_memory(tw_dev, sizeof(TW_Command_Apache_Header), 2)) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0xb, "Sense buffer allocation failed"); goto out; } /* Allocate event info space */ tw_dev->event_queue[0] = kcalloc(TW_Q_LENGTH, sizeof(TW_Event), GFP_KERNEL); if (!tw_dev->event_queue[0]) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0xc, "Event info memory allocation failed"); goto out; } for (i = 0; i < TW_Q_LENGTH; i++) { tw_dev->event_queue[i] = (TW_Event *)((unsigned char *)tw_dev->event_queue[0] + (i * sizeof(TW_Event))); tw_dev->free_queue[i] = i; tw_dev->state[i] = TW_S_INITIAL; } tw_dev->free_head = TW_Q_START; tw_dev->free_tail = TW_Q_START; tw_dev->error_sequence_id = 1; tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE; mutex_init(&tw_dev->ioctl_lock); init_waitqueue_head(&tw_dev->ioctl_wqueue); retval = 0; out: return retval; } /* End twl_initialize_device_extension() */ /* This function will perform a pci-dma unmap */ static void twl_unmap_scsi_data(TW_Device_Extension *tw_dev, int request_id) { struct scsi_cmnd *cmd = tw_dev->srb[request_id]; if (cmd->SCp.phase == TW_PHASE_SGLIST) scsi_dma_unmap(cmd); } /* End twl_unmap_scsi_data() */ /* This function will handle attention interrupts */ static int twl_handle_attention_interrupt(TW_Device_Extension *tw_dev) { int retval = 1; u32 request_id, doorbell; /* Read doorbell status */ doorbell = readl(TWL_HOBDB_REG_ADDR(tw_dev)); /* Check for controller errors */ if (doorbell & TWL_DOORBELL_CONTROLLER_ERROR) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0xd, "Microcontroller Error: clearing"); goto out; } /* Check if we need to perform an AEN drain */ if (doorbell & TWL_DOORBELL_ATTENTION_INTERRUPT) { if (!(test_and_set_bit(TW_IN_ATTENTION_LOOP, &tw_dev->flags))) { twl_get_request_id(tw_dev, &request_id); if (twl_aen_read_queue(tw_dev, request_id)) { tw_dev->state[request_id] = TW_S_COMPLETED; twl_free_request_id(tw_dev, request_id); clear_bit(TW_IN_ATTENTION_LOOP, &tw_dev->flags); } } } retval = 0; out: /* Clear doorbell interrupt */ TWL_CLEAR_DB_INTERRUPT(tw_dev); /* Make sure the clear was flushed by reading it back */ readl(TWL_HOBDBC_REG_ADDR(tw_dev)); return retval; } /* End twl_handle_attention_interrupt() */ /* Interrupt service routine */ static irqreturn_t twl_interrupt(int irq, void *dev_instance) { TW_Device_Extension *tw_dev = (TW_Device_Extension *)dev_instance; int i, handled = 0, error = 0; dma_addr_t mfa = 0; u32 reg, regl, regh, response, request_id = 0; struct scsi_cmnd *cmd; TW_Command_Full *full_command_packet; spin_lock(tw_dev->host->host_lock); /* Read host interrupt status */ reg = readl(TWL_HISTAT_REG_ADDR(tw_dev)); /* Check if this is our interrupt, otherwise bail */ if (!(reg & TWL_HISTATUS_VALID_INTERRUPT)) goto twl_interrupt_bail; handled = 1; /* If we are resetting, bail */ if (test_bit(TW_IN_RESET, &tw_dev->flags)) goto twl_interrupt_bail; /* Attention interrupt */ if (reg & TWL_HISTATUS_ATTENTION_INTERRUPT) { if (twl_handle_attention_interrupt(tw_dev)) { TWL_MASK_INTERRUPTS(tw_dev); goto twl_interrupt_bail; } } /* Response interrupt */ while (reg & TWL_HISTATUS_RESPONSE_INTERRUPT) { if (sizeof(dma_addr_t) > 4) { regh = readl(TWL_HOBQPH_REG_ADDR(tw_dev)); regl = readl(TWL_HOBQPL_REG_ADDR(tw_dev)); mfa = ((u64)regh << 32) | regl; } else mfa = readl(TWL_HOBQPL_REG_ADDR(tw_dev)); error = 0; response = (u32)mfa; /* Check for command packet error */ if (!TW_NOTMFA_OUT(response)) { for (i=0;i<TW_Q_LENGTH;i++) { if (tw_dev->sense_buffer_phys[i] == mfa) { request_id = le16_to_cpu(tw_dev->sense_buffer_virt[i]->header_desc.request_id); if (tw_dev->srb[request_id] != NULL) error = twl_fill_sense(tw_dev, i, request_id, 1, 1); else { /* Skip ioctl error prints */ if (request_id != tw_dev->chrdev_request_id) error = twl_fill_sense(tw_dev, i, request_id, 0, 1); else memcpy(tw_dev->command_packet_virt[request_id], tw_dev->sense_buffer_virt[i], sizeof(TW_Command_Apache_Header)); } /* Now re-post the sense buffer */ writel((u32)((u64)tw_dev->sense_buffer_phys[i] >> 32), TWL_HOBQPH_REG_ADDR(tw_dev)); writel((u32)tw_dev->sense_buffer_phys[i], TWL_HOBQPL_REG_ADDR(tw_dev)); break; } } } else request_id = TW_RESID_OUT(response); full_command_packet = tw_dev->command_packet_virt[request_id]; /* Check for correct state */ if (tw_dev->state[request_id] != TW_S_POSTED) { if (tw_dev->srb[request_id] != NULL) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0xe, "Received a request id that wasn't posted"); TWL_MASK_INTERRUPTS(tw_dev); goto twl_interrupt_bail; } } /* Check for internal command completion */ if (tw_dev->srb[request_id] == NULL) { if (request_id != tw_dev->chrdev_request_id) { if (twl_aen_complete(tw_dev, request_id)) TW_PRINTK(tw_dev->host, TW_DRIVER, 0xf, "Error completing AEN during attention interrupt"); } else { tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE; wake_up(&tw_dev->ioctl_wqueue); } } else { cmd = tw_dev->srb[request_id]; if (!error) cmd->result = (DID_OK << 16); /* Report residual bytes for single sgl */ if ((scsi_sg_count(cmd) <= 1) && (full_command_packet->command.newcommand.status == 0)) { if (full_command_packet->command.newcommand.sg_list[0].length < scsi_bufflen(tw_dev->srb[request_id])) scsi_set_resid(cmd, scsi_bufflen(cmd) - full_command_packet->command.newcommand.sg_list[0].length); } /* Now complete the io */ tw_dev->state[request_id] = TW_S_COMPLETED; twl_free_request_id(tw_dev, request_id); tw_dev->posted_request_count--; tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]); twl_unmap_scsi_data(tw_dev, request_id); } /* Check for another response interrupt */ reg = readl(TWL_HISTAT_REG_ADDR(tw_dev)); } twl_interrupt_bail: spin_unlock(tw_dev->host->host_lock); return IRQ_RETVAL(handled); } /* End twl_interrupt() */ /* This function will poll for a register change */ static int twl_poll_register(TW_Device_Extension *tw_dev, void *reg, u32 value, u32 result, int seconds) { unsigned long before; int retval = 1; u32 reg_value; reg_value = readl(reg); before = jiffies; while ((reg_value & value) != result) { reg_value = readl(reg); if (time_after(jiffies, before + HZ * seconds)) goto out; msleep(50); } retval = 0; out: return retval; } /* End twl_poll_register() */ /* This function will reset a controller */ static int twl_reset_sequence(TW_Device_Extension *tw_dev, int soft_reset) { int retval = 1; int i = 0; u32 status = 0; unsigned short fw_on_ctlr_srl = 0, fw_on_ctlr_arch_id = 0; unsigned short fw_on_ctlr_branch = 0, fw_on_ctlr_build = 0; u32 init_connect_result = 0; int tries = 0; int do_soft_reset = soft_reset; while (tries < TW_MAX_RESET_TRIES) { /* Do a soft reset if one is needed */ if (do_soft_reset) { TWL_SOFT_RESET(tw_dev); /* Make sure controller is in a good state */ if (twl_poll_register(tw_dev, TWL_SCRPD3_REG_ADDR(tw_dev), TWL_CONTROLLER_READY, 0x0, 30)) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x10, "Controller never went non-ready during reset sequence"); tries++; continue; } if (twl_poll_register(tw_dev, TWL_SCRPD3_REG_ADDR(tw_dev), TWL_CONTROLLER_READY, TWL_CONTROLLER_READY, 60)) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x11, "Controller not ready during reset sequence"); tries++; continue; } } /* Initconnect */ if (twl_initconnection(tw_dev, TW_INIT_MESSAGE_CREDITS, TW_EXTENDED_INIT_CONNECT, TW_CURRENT_DRIVER_SRL, TW_9750_ARCH_ID, TW_CURRENT_DRIVER_BRANCH, TW_CURRENT_DRIVER_BUILD, &fw_on_ctlr_srl, &fw_on_ctlr_arch_id, &fw_on_ctlr_branch, &fw_on_ctlr_build, &init_connect_result)) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x12, "Initconnection failed while checking SRL"); do_soft_reset = 1; tries++; continue; } /* Load sense buffers */ while (i < TW_Q_LENGTH) { writel((u32)((u64)tw_dev->sense_buffer_phys[i] >> 32), TWL_HOBQPH_REG_ADDR(tw_dev)); writel((u32)tw_dev->sense_buffer_phys[i], TWL_HOBQPL_REG_ADDR(tw_dev)); /* Check status for over-run after each write */ status = readl(TWL_STATUS_REG_ADDR(tw_dev)); if (!(status & TWL_STATUS_OVERRUN_SUBMIT)) i++; } /* Now check status */ status = readl(TWL_STATUS_REG_ADDR(tw_dev)); if (status) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x13, "Bad controller status after loading sense buffers"); do_soft_reset = 1; tries++; continue; } /* Drain the AEN queue */ if (twl_aen_drain_queue(tw_dev, soft_reset)) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x14, "AEN drain failed during reset sequence"); do_soft_reset = 1; tries++; continue; } /* Load rest of compatibility struct */ strncpy(tw_dev->tw_compat_info.driver_version, TW_DRIVER_VERSION, strlen(TW_DRIVER_VERSION)); tw_dev->tw_compat_info.driver_srl_high = TW_CURRENT_DRIVER_SRL; tw_dev->tw_compat_info.driver_branch_high = TW_CURRENT_DRIVER_BRANCH; tw_dev->tw_compat_info.driver_build_high = TW_CURRENT_DRIVER_BUILD; tw_dev->tw_compat_info.driver_srl_low = TW_BASE_FW_SRL; tw_dev->tw_compat_info.driver_branch_low = TW_BASE_FW_BRANCH; tw_dev->tw_compat_info.driver_build_low = TW_BASE_FW_BUILD; tw_dev->tw_compat_info.fw_on_ctlr_srl = fw_on_ctlr_srl; tw_dev->tw_compat_info.fw_on_ctlr_branch = fw_on_ctlr_branch; tw_dev->tw_compat_info.fw_on_ctlr_build = fw_on_ctlr_build; /* If we got here, controller is in a good state */ retval = 0; goto out; } out: return retval; } /* End twl_reset_sequence() */ /* This function will reset a device extension */ static int twl_reset_device_extension(TW_Device_Extension *tw_dev, int ioctl_reset) { int i = 0, retval = 1; unsigned long flags = 0; /* Block SCSI requests while we are resetting */ if (ioctl_reset) scsi_block_requests(tw_dev->host); set_bit(TW_IN_RESET, &tw_dev->flags); TWL_MASK_INTERRUPTS(tw_dev); TWL_CLEAR_DB_INTERRUPT(tw_dev); spin_lock_irqsave(tw_dev->host->host_lock, flags); /* Abort all requests that are in progress */ for (i = 0; i < TW_Q_LENGTH; i++) { if ((tw_dev->state[i] != TW_S_FINISHED) && (tw_dev->state[i] != TW_S_INITIAL) && (tw_dev->state[i] != TW_S_COMPLETED)) { if (tw_dev->srb[i]) { tw_dev->srb[i]->result = (DID_RESET << 16); tw_dev->srb[i]->scsi_done(tw_dev->srb[i]); twl_unmap_scsi_data(tw_dev, i); } } } /* Reset queues and counts */ for (i = 0; i < TW_Q_LENGTH; i++) { tw_dev->free_queue[i] = i; tw_dev->state[i] = TW_S_INITIAL; } tw_dev->free_head = TW_Q_START; tw_dev->free_tail = TW_Q_START; tw_dev->posted_request_count = 0; spin_unlock_irqrestore(tw_dev->host->host_lock, flags); if (twl_reset_sequence(tw_dev, 1)) goto out; TWL_UNMASK_INTERRUPTS(tw_dev); clear_bit(TW_IN_RESET, &tw_dev->flags); tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE; retval = 0; out: if (ioctl_reset) scsi_unblock_requests(tw_dev->host); return retval; } /* End twl_reset_device_extension() */ /* This funciton returns unit geometry in cylinders/heads/sectors */ static int twl_scsi_biosparam(struct scsi_device *sdev, struct block_device *bdev, sector_t capacity, int geom[]) { int heads, sectors; TW_Device_Extension *tw_dev; tw_dev = (TW_Device_Extension *)sdev->host->hostdata; if (capacity >= 0x200000) { heads = 255; sectors = 63; } else { heads = 64; sectors = 32; } geom[0] = heads; geom[1] = sectors; geom[2] = sector_div(capacity, heads * sectors); /* cylinders */ return 0; } /* End twl_scsi_biosparam() */ /* This is the new scsi eh reset function */ static int twl_scsi_eh_reset(struct scsi_cmnd *SCpnt) { TW_Device_Extension *tw_dev = NULL; int retval = FAILED; tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata; tw_dev->num_resets++; sdev_printk(KERN_WARNING, SCpnt->device, "WARNING: (0x%02X:0x%04X): Command (0x%x) timed out, resetting card.\n", TW_DRIVER, 0x2c, SCpnt->cmnd[0]); /* Make sure we are not issuing an ioctl or resetting from ioctl */ mutex_lock(&tw_dev->ioctl_lock); /* Now reset the card and some of the device extension data */ if (twl_reset_device_extension(tw_dev, 0)) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x15, "Controller reset failed during scsi host reset"); goto out; } retval = SUCCESS; out: mutex_unlock(&tw_dev->ioctl_lock); return retval; } /* End twl_scsi_eh_reset() */ /* This is the main scsi queue function to handle scsi opcodes */