summaryrefslogtreecommitdiff
path: root/drivers/block (follow)
Commit message (Collapse)AuthorAge
...
| * | | | NVMe: Pass the nvme_dev to nvme_free_prps and nvme_setup_prpsMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were passing the nvme_queue to access the q_dmadev for the dma_alloc_coherent calls, but since we moved to the dma pool API, we really only need the nvme_dev. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Optimise memory usage for I/Os between 4k and 128kMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a second memory pool for smaller I/Os. We can pack 16 of these on a single page instead of using an entire page for each one. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Switch to use DMA Pool APIMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling dma_free_coherent from interrupt context causes warnings. Using the DMA pools delays freeing until pool destruction, so avoids the problem. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Rename nvme_req_info to nvme_bioMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are too many things called 'info' in this driver. This data structure is auxiliary information for a struct bio, so call it nvme_bio, or nbio when used as a variable. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Initial PRP List supportShane Michael Matthews2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a pointer to the nvme_req_info to hold a new data structure (nvme_prps) which contains a list of the pages allocated to this particular request for holding PRP list entries. nvme_setup_prps() now returns this pointer. To allocate and free the memory used for PRP lists, we need a struct device, so we need to pass the nvme_queue pointer to many functions which didn't use to need it. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Advance the sg pointer when filling in an sg listMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For multipage BIOs, we were always using sg[0] instead of advancing through the list. Oops :-) Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Renumber the special context valuesMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If POISON_POINTER_DELTA isn't defined, ensure they're in page 0 which should never be mapped. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Handle the congestion list a little betterMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the bio completion handler, check for bios on the congestion list for this NVM queue. Also, lock the congestion list in the make_request function as the queue may end up being shared between multiple CPUs. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Record the timeout for each commandMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition to recording the completion data for each command, record the anticipated completion time. Choose a timeout of 5 seconds for normal I/Os and 60 seconds for admin I/Os. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Need to lock queue during interrupt handlingMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we're sharing a queue between multiple CPUs and we cancel a sync I/O, we must have the queue locked to avoid corrupting the stack of the thread that submitted the I/O. It turns out this is the same locking that's needed for the threaded irq handler, so share that code. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Detect command IDs completing that are out of rangeMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the adapter completes a command ID that is outside the bounds of the array, return CMD_CTX_INVALID instead of random data, and print a message in the sync_completion handler (which is rapidly becoming the misc completion handler :-) Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Detect commands that are completed twiceMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the context value to CMD_CTX_COMPLETED, and print a message in the sync_completion handler if we see it. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Use a symbolic name to represent cancelled commands instead of 0Matthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have plans for other special values in sync_completion. Plus, this is more self-documenting, and lets us detect bogus usages. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Add a module parameter to use a threaded interruptMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're currently calling bio_endio from hard interrupt context. This is not a good idea for preemptible kernels as it will cause longer latencies. Using a threaded interrupt will run the entire queue processing mechanism (including bio_endio) in a thread, which can be preempted. Unfortuantely, it also adds about 7us of latency to the single-I/O case, so make it a module parameter for the moment. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Call put_nvmeq() before calling nvme_submit_sync_cmd()Matthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't have preemption disabled when we call schedule(). Accept the possibility that we'll get preempted, and it'll cost us some cacheline bounces. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Allow fatal signals to interrupt I/OMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user sends a fatal signal, sleeping in the TASK_KILLABLE state permits the task to be aborted. The only wrinkle is making sure that if/when the command completes later that it doesn't upset anything. Handle this by setting the data pointer to 0, and checking the value isn't NULL in the sync completion path. Eventually, bios can be cancelled through this path too. Note that the cmdid isn't freed to prevent reuse. We should also abort the command in the future, but this is a good start. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Release 0.2Matthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Add download / activate firmware ioctlsMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Move sysfs entries to the right placeMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because I wasn't setting driverfs_dev, the devices were showing up under /sys/devices/virtual/block. Now they appear underneath the PCI device which they belong to. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Disable the device before we write the admin queuesShane Michael Matthews2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case the card has been left in a partially-configured state, write 0 to the Enable bit. Signed-off-by: Shane Michael Matthews <shane.matthews@intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Request I/O regionsMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling pci_request_selected_regions() reserves these regions for our use. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Allow queues to be allocated above 4GBMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Need to call dma_set_coherent_mask() to allow queues to be allocated above 4GB. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Enable device DMAMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Need to call pci_set_master() to enable device DMA Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Enable and disable the PCI deviceShane Michael Matthews2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call pci_enable_device_mem() at initialisation and pci_disable_device at exit. Signed-off-by: Shane Michael Matthews <shane.matthews@intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Check returns from nvme_alloc_queue()Matthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can return NULL, so handle that. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Remove 'node' from nvme_devMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't keep a list of nvme_dev any more Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Read the model, serial & firmware rev from the controllerMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Add NVME_IOCTL_SUBMIT_IOMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow userspace to submit synchronous I/O like the SCSI sg interface does. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Create nvme_map_user_pages() and nvme_unmap_user_pages()Matthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are generalisations of the code that was in nvme_submit_user_admin_command(). Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Change NVME_IOCTL_GET_RANGE_TYPE to return all the rangesMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Factor out most of nvme_identify() into a new nvme_submit_user_admin_command() function. Change nvme_get_range_type() to call it and change nvme_ioctl to realise that it's getting back all 64 ranges. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Zero the command before we send itMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure there's no left-over bits set from previous commands that used this slot. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Add nvme_setup_prps()Matthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generalise the code from nvme_identify() that sets PRP1 & PRP2 so that it's usable for commands sent by nvme_submit_bio_queue(). Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Use PRP2 for the nvme_identify ioctlMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DMA the result straight to userspace instead of bounce-buffering in the kernel. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Fix admin IRQ claim on real hardwareMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The admin IRQ is supposed to use the pin-based (or single message MSI) interrupt. Accomplish this by filling in entry[0]'s vector with the INTx irq number. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Rename 'cycle' to 'phase'Matthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's called the phase bit in the current draft Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Implement per-CPU queuesMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Reduce set_queue_count arguments by oneMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sq_count and cq_count are always the same, so just call it 'count'. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: Factor out queue_request_irq()Matthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two callers with an almost identical long string of arguments, and introducing a third soon. Time to factor out the commonalities. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| * | | | NVMe: New driverMatthew Wilcox2011-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver is for devices that follow the NVM Express standard Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
* | | | | Merge branch 'for-3.3/drivers' of git://git.kernel.dk/linux-blockLinus Torvalds2012-01-15
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-3.3/drivers' of git://git.kernel.dk/linux-block: mtip32xx: do rebuild monitoring asynchronously xen-blkfront: Use kcalloc instead of kzalloc to allocate array mtip32xx: uninitialized variable in mtip_quiesce_io() mtip32xx: updates based on feedback xen-blkback: convert hole punching to discard request on loop devices xen/blkback: Move processing of BLKIF_OP_DISCARD from dispatch_rw_block_io xen/blk[front|back]: Enhance discard support with secure erasing support. xen/blk[front|back]: Squash blkif_request_rw and blkif_request_discard together mtip32xx: update to new ->make_request() API mtip32xx: add module.h include to avoid conflict with moduleh tree mtip32xx: mark a few more items static mtip32xx: ensure that all local functions are static mtip32xx: cleanup compat ioctl handling mtip32xx: fix warnings/errors on 32-bit compiles block: Add driver for Micron RealSSD pcie flash cards
| * \ \ \ \ Merge branch 'for-3.3/mtip32xx' into for-3.3/driversJens Axboe2012-01-15
| |\ \ \ \ \
| | * | | | | mtip32xx: do rebuild monitoring asynchronouslyAsai Thambi S P2012-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier, rebuild monitoring was done in the context of probe. Now the service thread takes the responsibility of rebuild monitoring, and probe returns good status. Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com> Signed-off-by: Sam Bradshaw <sbradshaw@micron.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
| | * | | | | mtip32xx: uninitialized variable in mtip_quiesce_io()Dan Carpenter2011-11-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We recently introduce new continue in the loop which make gcc complain. In theory if MTIP_FLAG_SVC_THD_ACTIVE_BIT is set, we could hit continue over and over until eventually we time out of the loop. In that case "active" should be set as true, but right now it's uninitialized. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
| | * | | | | mtip32xx: updates based on feedbackAsai Thambi S P2011-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * queue ncq commands when a non-ncq is in progress or error handling is active * merge variables 'internal_cmd_in_progress' and 'eh_active' into new variable 'flags' * get rid of read/write semaphore 'internal_sem' * new service thread to issue queued commands * use macros from ata.h for command codes * return ENOTTY for BLKFLSBUF ioctl * style changes Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com> Signed-off-by: Sam Bradshaw <sbradshaw@micron.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
| | * | | | | mtip32xx: update to new ->make_request() APIJens Axboe2011-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jens Axboe <axboe@kernel.dk>
| | * | | | | mtip32xx: add module.h include to avoid conflict with moduleh treeJens Axboe2011-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jens Axboe <axboe@kernel.dk>
| | * | | | | mtip32xx: mark a few more items staticJens Axboe2011-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Missed two items: mtip_major, and mtip_pci_driver. Signed-off-by: Jens Axboe <axboe@kernel.dk>
| | * | | | | mtip32xx: ensure that all local functions are staticJens Axboe2011-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kill the declarations in the header file and mark them as static. Reshuffle a few functions to ensure that everything is properly declared before being used. Signed-off-by: Jens Axboe <axboe@kernel.dk>
| | * | | | | mtip32xx: cleanup compat ioctl handlingJens Axboe2011-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do the conversion/copy up front instead of passing in a compat flag to the ioctl handler and subsequently to the exec_drive_taskfile() function. Signed-off-by: Jens Axboe <axboe@kernel.dk>
| | * | | | | mtip32xx: fix warnings/errors on 32-bit compilesJens Axboe2011-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to clean up the compat ioctl handling, but this makes it work for now at least. Signed-off-by: Jens Axboe <axboe@kernel.dk>