summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-all.h
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-08-15 21:46:02 +0000
committermav <mav@FreeBSD.org>2015-08-15 21:46:02 +0000
commit45d8f68705cf2bbf0f3117ccc61eea95f0171baa (patch)
tree9ec893626cb63ac04e52aaf2736b3f2234ba7fd7 /sys/dev/ata/ata-all.h
parent3d392581f02d008390d3a659624bfedafccfc665 (diff)
downloadFreeBSD-src-45d8f68705cf2bbf0f3117ccc61eea95f0171baa.zip
FreeBSD-src-45d8f68705cf2bbf0f3117ccc61eea95f0171baa.tar.gz
Remove UMA allocation of ATA requests.
After CAM replaced old ATA stack, this driver processes no more then one request at a time per channel. Using UMA after that is overkill, so replace it with simple preallocation of one request per channel. MFC after: 2 weeks
Diffstat (limited to 'sys/dev/ata/ata-all.h')
-rw-r--r--sys/dev/ata/ata-all.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/dev/ata/ata-all.h b/sys/dev/ata/ata-all.h
index 19cb7ef..cf8ed78 100644
--- a/sys/dev/ata/ata-all.h
+++ b/sys/dev/ata/ata-all.h
@@ -450,6 +450,7 @@ struct ata_channel {
struct ata_cam_device curr[16]; /* Current settings */
int requestsense; /* CCB waiting for SENSE. */
struct callout poll_callout; /* Periodic status poll. */
+ struct ata_request request;
};
/* disk bay/enclosure related */
@@ -507,14 +508,6 @@ int ata_sata_getrev(device_t dev, int target);
int ata_request2fis_h2d(struct ata_request *request, u_int8_t *fis);
void ata_pm_identify(device_t dev);
-/* macros for alloc/free of struct ata_request */
-extern uma_zone_t ata_request_zone;
-#define ata_alloc_request() uma_zalloc(ata_request_zone, M_NOWAIT | M_ZERO)
-#define ata_free_request(request) { \
- if (!(request->flags & ATA_R_DANGER2)) \
- uma_zfree(ata_request_zone, request); \
- }
-
MALLOC_DECLARE(M_ATA);
/* misc newbus defines */
OpenPOWER on IntegriCloud